Install Pure-FTPd on CentOS with Virtual Users
To install Pure-FTPd on CentOS, run
yum install -y pure-ftpd
Edit configuration file
vi /etc/pure-ftpd/pure-ftpd.conf
To disable anonymous FTP, find
NoAnonymous no
Replace with
NoAnonymous yes
To enable Virtual Users, find
# PureDB /etc/pure-ftpd/pureftpd.pdb
Uncomment the line.
PureDB /etc/pure-ftpd/pureftpd.pdb
To Allow Apache user to login via FTP, find
MinUID 1000
Replace with
MinUID 47
I set MinUID value to 47, as apache user have UID/GID of 48. By setting MinUID below that apache user should be able to login.
Set pureftpd to start on Boot
systemctl enable pure-ftpd
Restart pure-ftpd
systemctl start pure-ftpd
Create a Virual User
To create a virtual user, run
pure-pw useradd USER_NAME_HERE -u apache -g apache -d /var/www/html/
It will ask you to enter password two times.
Now run
pure-pw mkdb systemctl restart pure-ftpd
Change Password of an existing Virual User
pure-pw passwd USER_NAME_HERE
It will ask you to enter new password.
Rebuild password database and restart pure-ftpd with
pure-pw mkdb systemctl restart pure-ftpd
Related Posts