# sudo -s
# apt-get install pure-ftpd pureadmin
Create the user and group accounts:
sudo groupadd ftpgroup
sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser
sudo mkdir /home/ftpusers
sudo chown -R ftpuser:ftpgroup /home/ftpusers
# pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe
Type in the password when prompted for the new user twice.
Create the database and make sure that the pure-ftpd configuration strictly uses the pdb file for managing accounts:
# pure-pw mkdb
# ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB
# gedit /etc/pure-ftpd/conf/PAMAuthentication
Change yes into no (or yes to allow system users to logon)
Make sure that a backup file (.PAMAuthentication~) isn’t created because it will create a conflict when trying to restart service. Using PAM can allow public access to administrative accounts using pure-ftpd, that’s why I disable it within pure-ftpd. I prefer it off so I can strictly use virtual accounts maintained within the pdb file.
Finally it’s time to enable the pdb file and yes you do have to stop the server in order to avoid errors stating that the port is already in use.
# /etc/init.d/pure-ftpd stop
# /usr/sbin/pure-ftpd -j -lpuredb:/etc/pure-ftpd/pureftpd.pdb &
# /etc/init.d/pure-ftpd start
It works great and is very simple to administer with PureAdmin. Most of the virtual user creation can be done there. Saves a lot of time. The visual log helps out a bit too.
Later you can use
May need to add
# ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50PureDB to allow it to point to .pdb