FreeKB - Install and configure PureFTPd Server on Linux
FTP - Install and configure PureFTPd Server on Linux

To install PureFTPd in Linux, enter the following commands in the Linux Terminal. If using a Red Hat version of Linux (CentOS / RHEL), replace apt-get with yum. Also, if using CentOS, you will need to update:

http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-7.noarch.rpm

 

Install PureFTPd.

apt-get install pure-ftpd

 

Create a group named ftpgroup.

groupadd ftpgroup

 

Add the user "wendy" to the ftpgroup.

usermod –a –G ftpgroup wendy

 

For reassurance that wendy was added to the ftpgroup,view the /etc/group file.

cat /etc/groups | grep ftpgroup

 

Create a directory named ftpusers.

mkdir /home/ftpusers

 

Create a directory named jeremy.  Of course, you can use a different username.

mkdir /home/ftpusers/jeremy

 

Create a user account named jeremy to PureFTPd, and sets the directory for the user account. If using CentOS, you need to use the uid and gid, such as: pure-pw useradd wendy -u 1000 -g 1001 -d /home/ftpusers/wendy

pure-pw useradd wendy -u ftpuser -d /home/ftpusers/wendy

 

Create the pureftpd.passwd database.

pure-pw mkdb

 

Create a symbolic link between /etc/pure-ftpd/pureftpd.passwd and /etc/pureftpd.passwd.  

ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd

 

Create a symbolic link between /etc/pure-ftpd/pureftpd.pdb and /etc/pureftpd.pdb.

ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb

 

Creates a symbolic link between /etc/pure-fptd/PureDB and /etc/pure-ftpd/auth/PureDB.

ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB

 

Recursively changes the ownership of /home/ftpusers/.  The owner is root and the group owner is ftpgroup.

chown -hR root:ftpgroup /home/ftpusers/

 

The ps command can be used to determine if your system is using init or systemd. If PID 1 is init, then you will use the service command. If PID 1 is systemd, then you will use the systemctl command.

If your system is using systemd, use the systemctl command to start and enable Pure-FTPd.

systemctl enable pure-ftpd
systemctl start pure-ftpd
systemctl status pure-ftpd

 

If your system is using init, use the chkconfig and service commands to start and enable Pure-FTPd.

chkconfig pure-ftpd on
service pure-ftpd start
service pure-ftpd status

 

Optional: Pureadmin can also be installed using apt-get or yum if we want to administer PureFTPd using the Pureadmin GUI application.

apt-get install Pureadmin
yum install Pureadmin

 

In order for computers to be able to connect to our FTP Server:

  • Routers in LAN will need to forward traffic on port 21 to the private IP address of the computer in our LAN that is running PureFTPd. Nmap can be used to verify if port 21 is open.
  • The iptables firewall will need to allow traffic on port 21.

 

If some problem occurs, for which you need to completely uninstall Pure-FTPd, use these commands.

apt-get remove --auto-remove pure-ftpd-common
apt-get purge pure-ftpd-common

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 039f3 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |