Installing and Configuring Pure-FTPD on CentOS 7
Pure-FTPd is a free (BSD license) FTP Server with a strong focus on software security. It can be compiled and run on a variety of Unix-like computer operating systems including Linux, OpenBSD, NetBSD, FreeBSD, DragonFly BSD, Solaris, Tru64, Darwin, Irix and HP-UX. It has also been ported to Android.
You can directly install Pure-FTPD using yum command:
yum install pure-ftpd
– Configuring Pure-FTPd
The configuration files for pure-ftpd are located in the file
/etc/pure-ftpd/pure-ftpd.conf. So the first thing we’re going to do is to edit it using the command:
And modify the following:
- Comment the line
- Enable the PureDB functionality by uncomment the line
- Change the value for
– Start Pure-FTPd as a service
To start Pure-FTPd, use the command:
systemctl start pure-ftpd
Then, enable the Pure-FTPd service:
systemctl enable pure-ftpd
Create a new ftp user account
In order to create FTP user account “virtual user” we need to walk through the following steps:
– Adding a “Default” User and Group
For smooth functioning, Pure-FTPd requires you to create a default user and group with no special permissions or even a password. We’re going to call this “pureftpuser” and “pureftpgroup.” Here are the commands:
Create a default group:
Create a default user:
useradd -g pureftpgroup pureftpuser
Now we have a user called “pureftpuser” belonging to the group “pureftpgroup.”
– Create virtual user
- To create a virtual user, we only need a name for that virtual user like testftpuser.
- Assigned this virtual user to the “pureftpuser” system account we created earlier.
- And, assign a folder like “/home/www/domain.com” as their root directory.
pure-pw useradd testftpuser -u pureftpuser -d /home/www/domain.com
You’ll be asked for a password, and it’s confirmation.
– Set the folder permission
Make sure the folder is created, and give our user/group ownership permissions:
chown -R pureftpuser.pureftpgroup /home/www/domain.com
– Rebuild the puredb
Once the virtual user has been created, we need to rebuild the puredb using the following command:
– Access the FTP account
you can access your new FTP account using the following:
- Host: your_up_address
- UserName: testftpuser
- Password: testftpuser_password