Install FTP server – PureFTPd

You want to set up an FTP server on your Linux installation ?

Here are the main steps you can use to set up very quickly a reliable and secure server under BSD licence : Pure-FTPd. The commands used in this tutorial are the commands available under Ubuntu Server and can so be different depending on the distribution you are using, especially on the packages installation.

Package installation :

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

Group ftpgroup creation:

sudo groupadd ftpgroup

User ftpuser creation (linux user):

sudo useradd -g ftpgroup -d /dev/null -s /usr/sbin/nologin ftpuser

We can now create the user myuser (FTP user):

sudo pure-pw useradd myuser -u ftpuser -g ftpgroup -d /var/www/

Les options sont les suivantes :

  • -u uid
  • -g gid
  • -d user home

If you want to change the user password, just use the following command-line:

sudo pure-pw passwd myuser

Any time you perform a change or a creation of any user, you will need to re-generate the users database:

sudo pure-pw mkdb

Then you can activate the authentication linked to Pure-FTPd and restart the server:

sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50pure
sudo /etc/init.d/pure-ftpd restart

For a complete documentation, let’s go to the official PureFTPd website.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *