Bobcares

Install Pure-FTPd Ubuntu – How we do it

by | Dec 25, 2020

Wondering how to install Pure-FTPd on Ubuntu? We can help you with it.

Here at Bobcares, we have seen several such Ubuntu related queries as part of our Server Management Services for web hosts and online service providers.

Today, we’ll take a look at how to install Pure-FTPd on Ubuntu.

 

How we install Pure-FTPd on Ubuntu Server

Now let’s take a look at how our Support Engineers install Pure-FTPd on Ubuntu Servers.

First, we run the below command to install PureFTPd in Ubuntu.

sudo apt-get install pure-ftpdCopy Code

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/ftpuserCopy Code

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.

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-ftpdCopy Code

 

Configuring 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
echoyes” > /etc/pure-ftpd/conf/Daemonize
echoyes” > /etc/pure-ftpd/conf/NoAnonymous
echoyes” > /etc/pure-ftpd/conf/ChrootEveryone
echoyes” > /etc/pure-ftpd/conf/IPV4Only
echoyes” > /etc/pure-ftpd/conf/ProhibitDotFilesWriteCopy Code

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-ftpdCopy Code

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

 

Managing 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 mkdbCopy Code

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:

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

Not in chroot jail:

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

View a User

sudo pure-pw show $USERNAMECopy Code

Change a User’s Password

sudo pure-pw passwd $USERNAME -mCopy Code

Update an Existing User

sudo pure-pw usermod $USERNAME $OPTIONS -mCopy Code

Deleting a User

sudo pure-pw userdel $USERNAME -mCopy Code

Listing All Users

sudo pure-pw listCopy Code

Update the User/Password Database Manually

sudo pure-pw mkdbCopy Code

Managing the Pure-FTP Server

Start Pure-FTPd Server

sudo service pure-ftpd startCopy Code

Stop Pure-FTPD
Note: This does not disconnect active users.

sudo service pure-ftpd stopCopy Code

Disconnect All Active Users Immediately

sudo killall pure-ftpdCopy Code

Pure-FTPd Status

sudo service pure-ftpd statusCopy Code

Restart Pure-FTPd

sudo service pure-ftpd restartCopy Code

View Server Activity

sudo pure-ftpwhoCopy Code

 

[Need any further assistance with Ubuntu queries? – We are here to help you.]

 

Conclusion

Today, we saw how our Support Engineers install Pure-FTPd on Ubuntu.

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Speed issues driving customers away?
We’ve got your back!