The target of this tutorial is to have a successful installation of the ftp-daemon pureftpd working with virtual user accounts.
Step 1. Installation.
apt-get install pure-ftpd-common pure-ftpd
Step 2. Configuring Pure-ftpd
We now want to setup a few things so that we can run Pure-FTPd as a daemon.
Step 2.1 First you need to set Pure-FTPd as a standalone server:
mcedit /etc/default/pure-ftpd-common
Replace this:
STANDALONE_OR_INETD=inetd
With this:
STANDALONE_OR_INETD=standalone
Step 2.2 Now we want to ensure that the standalone server checks our usernames and passwords against the pureftpd database file:
cd /etc/pure-ftpd/conf
mcedit PureDB
Add the following to that file (if it doesn’t exist):
/etc/pure-ftpd/pureftpd.pdb
Step 2.3 Restart Pure-FTPd:
/etc/init.d/pure-ftpd restart
Pure-FTPd should now startup in daemon mode and everything should be up and running.
Step 3. We need to create a new system group for pureftpd:
groupadd ftpgroup
Step 4. 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
Step 5. Now create your first FTP user. For this example the user “test”:
pure-pw useradd test -u ftpuser -g ftpgroup -d /home/pubftp/test -N 100
NOTE : Now you gave him a limit of 100 MB disk space with the option “-N 10“.
Now you have to enter test’s new password twice.
By default your users will be saved in /etc/pureftpd.passwd.
You will need to create some simlinks:
ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd
ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb
ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB
Step 6. Update the pureftpd-Database:
pure-pw mkdb
The “Database” here is simply a binary file.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 test
NOTE : If you forgot the password for a user, you can reset it as follows:
pure-pw passwd test
You need to update your database after you’ve done that: AGAIN
pure-pw mkdb
Step 7. Start the pureftpd server:
/etc/init.d/pure-ftpd start
Done.
IMPORTANT NOTE:
After restart you have this error ? Pure-FTPD (?@?) [ERROR] Sorry, invalid address given ,
How to fix? U se the following command :
echo “yes” > /etc/pure-ftpd/conf/DontResolve

Recent Comments