在debian上安装pureftpd
时间:2006-08-22 来源:nothing9
The target of this tutorial is to have a successful installation of the ftp-daemon pureftpd working with virtual user accounts. You should already know about installing pureftpd.
If you don't have it installed already just run:
# apt-get install pure-ftpd-common pure-ftpd
First of all, create a new system group for pureftpd:
# groupadd ftpgroup
As the second step you may add a user for it and give him no permission to a home directory or any shell:
# useradd -g ftpgroup -d /dev/null -s /etc ftpuser
Now lets create our first FTP user. For this example the user "remo":
# pure-pw useradd remo -u ftpuser -g ftpgroup -d /home/pubftp/remo -N 10
I gave him a limit of 10 MB disk space with the option "-N 10". Now you have to enter remo's new password twice.
By default your users will be saved in /etc/pureftpd.passwd, but first we have to update the pureftpd-Database:
# pure-pw mkdb
The "Database" here is simply a binary file. But it is ordered and has an index for quick access. To get some userdetails, enter:
# pure-pw list
to get a complete list of all pureftpd users.
If you want to show information about a specific user:
# pure-pw show remo
This will show you detailled information about the user "remo".
What does the line "Directory: /home/pubftp/helmut/./" specificaly the trailing ./ mean? Its simply the chroot for the user, that means he can't go "above" his directory.
If you forgot the password for a user, you can reset it as follows:
# pure-pw passwd remo
But please don't forget to update your database after you've done that:
# pure-pw mkdb
To test the server, first start it:
# /usr/sbin/pure-ftpd -S 127.0.0.1,21 -c 30 -C 1 -l puredb:/etc/pureftpd.pdb -x -E -j -R
Now you should be able to connect via any FTP client.