- Install vsftpd:
# yum install vsftpd
- To start after reboot:
# chkconfig vsftpd on
- Edit /etc/vsftpd/vsftpd.conf:
anonymous_enable=NO
chroot_local_user=YES
userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/vsftpd/vsftpd.user_list
- Edit or create /etc/vsftpd/vsftpd.user_list and add usernames with read write permissions
user1
user2
- Add ftp user:
# /usr/sbin/useradd -g 50 -p password -s /bin/false -d /var/www/html/folder/ user1
- Set folder owner:
# chown -R user1.apache /var/www/html/folder/
- Set shell:
# chsh -s /sbin/nologin user1
- Configure SELinux:
# /usr/sbin/setsebool -P ftp_home_dir 1
# /usr/sbin/setsebool -P allow_ftpd_full_access 1
- Configure iptables to open port 21
This will prevent errors if permissions of folders sets correctly (530 login incorrect, 553 Could not create file, 500...)