This document describes how to install and configure ProFTPD on CentOS Server. ProFTPD is an FTP daemon for unix and unix-like operating systems. ProFTPD is developed, released and distributed under the GNU Public License (GPL), which basically establishes it as free software, meaning that it may be sold, licensed and otherwise manipulated in any way desired as long as full and complete source code either accompanies any ProFTPD packages or is made available by any and all sites that distribute pre-compiled binaries. The software can be modified by anyone at anytime, as long as all derived works also are licensed under the GNU Public License.
Install proftpd on centos
Let’s assume that 192.168.0.100 is your IP address in this tutorial and http://server1.example.com is the hostname.
Install ProFTPD:
- For this enable EPEL as follows:
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
- First install the ProFTPD and OpenSSL as follows:
yum install -y proftpd openssl proftpd-utils
Start the services
systemctl start proftpd.service
systemctl enable proftpd.service
Addition in CentOS /Ubuntu we need to configure Firewall-cmd for ftp service as follows:
firewall-cmd --add-service=ftp --permanent
firewall-cmd --reload
We can check the ProFTPD version as follows:
proftpd -v
[root@server1 ~]# proftpd -v ProFTPD Version 1.3.5 [root@server1 ~]#
Creating ProFTPD Users
For this I will create a group ftpgroup and user srijan for ProFTPD. I will restrict the user srijan with home directory as /ftpshare
groupadd ftpgroup
Next I will add the user srijan in ftpgroup:
useradd -G ftpgroup srijan -s /sbin/nologin -d /ftpshare passwd srijan
[root@server1 ~]# passwd srijan Changing password for user srijan. New password: <--ftppassword Retype new password: <--ftppassword passwd: all authentication tokens updated successfully. [root@server1 ~]#
Next we need to make the directory protected from removing and renaming its content by any user, so we will change the directory permissions as follows:
chmod -R 1777 /ftpshare/
Now we are ready for ProFTPD connection
Now we can do login with the user srijan and password at http://ftp://192.168.0.100
How to Enable FirewallD on Centos
How to connect
I used sftp://purproxy.net as host to connect to my ftp.
Adding wordpress writing permissions
After installing wordpress : Add below code in wp-config.php
define('FS_METHOD', 'direct');
and the command line :
chown -R apache:apache /var/www/html