Steps to Install Pure-FTPD on Ubuntu 18.04 LTS Server

Are you trying to install Pure-FTPd on Ubuntu?

This guide is for you.

Pure-FTPd is a small, simple server for the old and hairy File Transfer Protocol, designed to use less resources than older servers, be smaller and very secure, and to never execute any external program.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Ubuntu related tasks.

In this context, we shall look into the steps to install Pure-FTPd on Ubuntu.

Steps to install Pure-FTPd on Ubuntu Server?

Here, you will learn the process to follow to install Pure-FTPd on Ubuntu Servers.

i. First, we run the following command to install PureFTPd in Ubuntu;

sudo apt-get install pure-ftpd

ii. After the pure-ftpd installation, by default, it allows anyone with accounts on the system logs on automatically.

We can use virtual users on the FTP-server instead of regular Linux user accounts. For that, we start by creating an unprivileged user and group that is dedicated to those users using the following commands:

sudo groupadd ftpgroup
sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser
sudo chown -R ftpuser:ftpgroup /home/ftpuser

This will also create a shared space called ftpuser. It will be the root of their access on the server if we create the users in chroot jail where they cannot move up to higher levels. Alternatively, we can create individual directories for each user. Instead, if we do not want them to have shared space and then optionally link them to a specially set up shared area using a symlink.

iii. We need ftpgroup group and the ftpuser user when we are setting up users in the FTP server.

Also, we can uninstall the Pure-FTPD installation by running the following set of commands;

sudo service pure-ftpd stop
sudo apt-get autoremove pure-ftpd
sudo apt-get purge pure-ftpd
sudo rm -r /etc/pure-ftpd

How to configure Pure-FTPd on Ubuntu?

After installing the server, we can find all of the Pure-FTPd configuration files in the directory /etc/pure-ftpd/conf. Also, one of the major differences between Pure-FTPd and the other FTP servers is that there is no single configuration file to configure Pure-FTPd. Moreover, different settings have their own file.

We run the below commands to configure Pure-FTPd and allow basic security. Also, these commands will set individual settings for the server;

sudo bash
echo “yes” > /etc/pure-ftpd/conf/Daemonize
echo “yes” > /etc/pure-ftpd/conf/NoAnonymous
echo “yes” > /etc/pure-ftpd/conf/ChrootEveryone
echo “yes” > /etc/pure-ftpd/conf/IPV4Only
echo “yes” > /etc/pure-ftpd/conf/ProhibitDotFilesWrite

After that, the below individual files will be created in the default conf directory;

Daemonize = Runs Pure-FTPd as daemon
NoAnonymous = disable Anonymous logins
ChrootEveryone = Keep everyone in their home directory
IPV4Only = Only allow IPv4 to connect
ProhibitDotFilesWrite = Don’t not edit dot files

Then we run the below command to restart the server;

sudo systemctl restart pure-ftpd

Now, we can connect using the server hostname or server IP address.

Below are more setting files that we can create;

echo ‘yes’ > BrokenClientsCompatibility
echo ’50’ > MaxClientsNumber
echo ‘5’ > MaxClientsPerIP
echo ‘no’ > VerboseLog
echo ‘yes’ > DisplayDotFiles
echo ‘yes’ > NoChmod
echo ‘no’ > AnonymousOnly
echo ‘no’ > PAMAuthentication
echo ‘no’ > UnixAuthentication
echo ‘/etc/pure-ftpd/pureftpd.pdb’ > PureDB
echo ‘yes’ > DontResolve
echo ’15’ > MaxIdleTime
echo ‘2000 8’ > LimitRecursion
echo ‘yes’ > AntiWarez
echo ‘no’ > AnonymousCanCreateDirs
echo ‘4’ > MaxLoad
echo ‘no’ > AllowUserFXP
echo ‘no’ > AllowAnonymousFXP
echo ‘no’ > AutoRename
echo ‘yes’ > AnonymousCantUpload
echo ‘yes’ > NoChmod
echo ’80’ > MaxDiskUsage
echo ‘yes’ > CustomerProof
echo ‘0’ > TLS

 How to Manage Pure-FTP Virtual Users ?

It is pretty simple to manage users from the command line. Alternatively, Pure-FTPd users can be managed using a MySQL database.

Below are the commands to manage users.

Creating the First User

sudo pure-pw useradd $USERNAME -u ftpuser -d /home/ftpuser
sudo pure-pw mkdb

If we want to create an admin user with full access to the server, we omit the -d /home/ftpuser parameter which would normally cause this directory to become the root of the user’s FTP session.

Creating Additional Users

In chroot jail, execute:

sudo pure-pw useradd $USERNAME -u ftpuser -d /home/ftpuser -m

Not in chroot jail, execute:

sudo pure-pw useradd $USERNAME -u ftpuser -D /home/$USERNAME -m

View a User

sudo pure-pw show $USERNAME

Change a User's Password

sudo pure-pw passwd $USERNAME -m

Update an Existing User

sudo pure-pw usermod $USERNAME $OPTIONS -m

Deleting a User

sudo pure-pw userdel $USERNAME -m

Listing All Users

sudo pure-pw list

Update the User/Password Database Manually

sudo pure-pw mkdb

How to Managing the Pure-FTP Server?

Study the following scenarios;

Start Pure-FTPd Server

sudo service pure-ftpd start

Stop Pure-FTPD

Note: This does not disconnect active users.

sudo service pure-ftpd stop

Disconnect All Active Users Immediately

sudo killall pure-ftpd

Pure-FTPd Status

sudo service pure-ftpd status

Restart Pure-FTPd

sudo service pure-ftpd restart

View Server Activity

sudo pure-ftpwho

 [Need urgent assistance with Ubuntu related Tasks or Installations? – We are here to help you.]


#Pure-FTPd is a fast, production-quality, standard-conformant #FTP (SSL/TLS) server, based upon Troll-FTPd.

This article will guide you through the processes to install Pure-FTPd on your #Ubuntu server.