How to install pureftpd on Debian with virtual user accounts

Valic —  June 11, 2010 — 3 Comments

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:


With this:


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):


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



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


Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

3 responses to How to install pureftpd on Debian with virtual user accounts

  1. not working on debian 7

  2. What is not working. be more specific please

Trackbacks and Pingbacks:

  1. Integrate ClamAV into PureFTPf on Debian for better protection | Linux Debian Tutorials | Debian Squeeze Tutorials - September 19, 2012

    […] Step 1. First make sure you have followed this tutorial : How to install PureFTPd on Debian […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.