Set up an ftp server using centos and set up ftp using centos
1. Install vsftpd
sudo yum install vsftpd
2. Configure vsftpd. conf
# Allow anonymous FTP? (Beware-allowed by default if you comment this out ). anonymous_enable = NO # When SELinux is enforcing check for SE bool ftp_home_dirlocal_enable = YESwrite_enable = YES # local ftp directory address local_root =/var/ftp
3. Add an ftp user
# Create user adduser-d/var/ftp-g ftp-s/sbin/nologin * _ ftp # Change Password passwd * _ ftp
4. Upload permission
# Modify the upload path permission 777. Set sudo chmod-R 777/var/ftp. # view ftp settings getsebool-a | grep ftpftp_home_dir --> onftpd_anon_write --> offline --> offftpd_connect_db --> offftpd_full_access --> offline --> offsftpd_full_access --> offline --> offtftp_home_dir --> off # Change ftp_home_dir and ftpd_full_access to onsetsebool-P ftp_home_dir = on ftpd_full_access = on
5. Set vsftp to start upon startup
chkconfig vsftpd on
6. Add a firewall
firewall-cmd --permanent --add-service=ftpfirewall-cmd --reload