PureFTPd Installation and Setup


The following HOWTO is aimed at installing and setting up a FTP server, based on Pure-FTPd, which supports multiple Virtual Hosts.


* A Debian Etch base installation - Installation HOWTO here.
* Root access to your server.


Before proceeding to install, update the necessary packages in Debian with these commands.

apt-get update
apt-get upgrade

Install Pure-FTPd

In a Linux shell run the following:

apt-get install pure-ftpd-common pure-ftpd

Now we need to create a new system group for pureftpd:

groupadd ftpgroup

Now we add a user for the group and give that user no permission to a home directory or a shell:

useradd -g ftpgroup -d /dev/null -s /etc ftpuser

Create a new user

Lets create our first FTP user. In this example our user will be “justin”:

pure-pw useradd justin -u ftpuser -g ftpgroup -d /home/pubftp/justin -N 10

In the above command we gave him a limit of 10 MB disk space with the option “-N 10?. Now you have to enter justin’s new password twice.

By default your users will be saved in /etc/pure-ftpd/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.

User Information

To get some user details enter the following to get a complete list of all pureftpd users:

pure-pw list

If you want to show information about a specific user:

pure-pw show justin

This will show you detailed information about the user “justin”.

You will notice that the line “Directory: /home/pubftp/justin/./” has a trailing ./ but you shouldn’t worry as this is simply the chroot for the user, which means he can’t go “above” his directory.

Resetting a password

If you forget the password for a user, you can reset it as follows:

pure-pw passwd justin

After a password reset update your database:

pure-pw mkdb

Starting the FTP Server

To test the server let’s start it:

/usr/sbin/pure-ftpd -S,21 -c 30 -C 1 -l puredb:/etc/pureftpd.pdb -x -E -j -R

The shell will open up a new pure-ftpd session and you should be able to connect to your FTP server. Use an FTP client to test whether or not you are able to login with your user details you created.

Once you are happy close the session off:

ctrl   z

Configuring Pure-FTPd

Right so by now you have created a user and been able to connect to your FTP server. We now want to setup a few things so that we can run Pure-FTPd as a daemon.

First you need to set Pure-FTPd as a standalone server:

vim /etc/default/pure-ftpd-common

Replace this:


With this:


Now we want to ensure that the standalone server checks our usernames and passwords against the pureftpd database file:

cd /etc/pure-ftpd/conf
vim PureDB

Add the following to that file (if it doesn’t exist):


Now we need to create a symbolic link to the PureDB file:

cd /etc/pure-ftpd/auth
ln -s /etc/pure-ftpd/conf/PureDB 50pure
ls -ls

You should now see a new file “50pure” linking to ../conf/PureDB.

Restart Pure-FTPd:

/etc/init.d/pure-ftpd restart

Pure-FTPd should now startup in daemon mode and everything should be up and running.

  • 0 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

OpenVZ basic commands

Following are some important commands which are normally used while working on a Hardware...

Howto List existing VPS

SSH to the master server and run the following command:/usr/sbin/vzlist -aThe -a switch tells the...

Install shoutcast server on CentOS server

Shoutcast is a free-of-charge audio homesteading solution. It permits anyone on the internet to...

How to integrate XCache into PHP5 on a Fedora 8 or CentOS 5.1 system (with Apache2)

From the XCache project page: “XCache is a fast, stable PHP opcode cacher that has been...

Setup VNC server on VPS

We will discuss  setting up your VPS as a VNC server and using a client from your Windows...