VSFTPD (Very Secure File Transport Protocol Daemon) is an open source for uploading files to a server. Its very fast and secure files transfer.
Install :
To install vsftpd package using yum command,
# yum install vsftpd
Find the vsftpd location,
# whereis vsftpd
vsftpd: /usr/sbin/vsftpd /etc/vsftpd /usr/share/man/man8/vsftpd.8.gz
Configure file Path
/etc/vsftpd/vsftpd.conf
Users that are not allowed to login via ftp
/etc/vsftpd/ftpusers
For users that are denied.
user_list
FTP log path
/var/log/xferlog
Enable a service to be started on bootup time
# systemctl enable vsftpd.service
To start vsftpd,
# systemctl start vsftpd.service
How to Configure,
Create a user name and set password,
# useradd ftpusers
# passwd ftpusers
# passwd ftpusers
Assign the directory path to that user, chnage port number in your configuration file. Open vsftpd.conf
# /etc/vsftpd/vsftpd.conf
# log path
xferlog_file=/var/log/xferlog
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
# location to upload files on server
local_root=/var/www/html/ftpusers
# Allow local users to login, local_enable set to 'YES'
local_enable=YES
# Allow local users to be enable write to a directory write_enable set to 'YES'
write_enable=YES
listen=YES
#Change ftp port
listen_port=2112
Once configured restart your vsftpd,
# systemctl restart vsftpd
vsftpd allow through the firewall
# firewall-cmd --permanent --add-port=2112/tcp
Restart firewall,
# firewall-cmd --reload
Once you connected the FTP check the log using tail command,
# tail -f /var/log/xferlog
Check your FTP connection which is pointing to port number,
# netstat -anp | grep ftp
tcp 0 0 0.0.0.0:2112 0.0.0.0:*
LISTEN 20841/vsftpd
Incredibly helpful, thank you!