Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 12.45 minutes in December 2020 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

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-ftpd

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.

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

 

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

 

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

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

Not in chroot jail:

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

Managing the Pure-FTP Server

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 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.

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

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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

server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

Categories:

Tags: