Friday, 7 October 2016

RHEL/CentOS 7: Setup FTP/vsftpd

RHEL/CentOS 7: Setup FTP/vsftpd


Install vsftpd


yum install vsftpd ftp -y

Edit the following file


/etc/vsftpd/vsftpd.conf

Uncomment the following

anonymous_enable=NO
ascii_upload_enable=YES
ascii_download_enable=YES
use_localtime=YES

Enable and start vsftpd


systemctl enable vsftpd
systemctl start vsftpd

Firewall


Allow connections to FTP;

firewall-cmd --permanent --add-port=21/tcp

or

firewall-cmd --permanent --add-service=ftp

Apply rules


firewall-cmd --reload

Create user for FTP


useradd ftp_user
passwd Bffdgkldfg

Restrict FTP users to their home folders


chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

No comments:

Post a Comment