CentOS Build FTP Server
1. Install VSFTPD
sudo yum install vsftpd
2. Configure vsftpd.conf
# Allow anonymous FTP? (beware-allowed by default if your comment this.
) Anonymous_enable=no
# When SELinux are enforcing check for SE bool Ftp_home_dir
local_enable=yes
write_ Enable=yes
# Local FTP directory address
local_root=/var/ftp
3. Add FTP User
#创建用户
adduser-d/var/ftp-g ftp-s/sbin/nologin *_ftp
#修改密码
passwd *_ftp
4. Upload permission
# Modify Upload Path Permissions 777 More personal preferences set permissions
sudo chmod-r 777/var/ftp
# View FTP settings
getsebool-a|grep FTP
ftp_home_dir-- > on
ftpd_anon_write--> off
ftpd_connect_all_unreserved--> off
ftpd_connect_db-->
off Ftpd_full_access--> on
ftpd_use_cifs--> off
ftpd_use_fusefs--> off
ftpd_use_nfs--> off< C13/>ftpd_use_passive_mode--> off
httpd_can_connect_ftp--> off
httpd_enable_ftp_server--> off
sftpd_anon_write--> off
sftpd_enable_homedirs--> off
sftpd_full_access--> off
sftpd _write_ssh_home--> off
tftp_anon_write--> off
tftp_home_dir--> off
# modify Ftp_home_dir, Ftpd_ Full_access to on
setsebool-p Ftp_home_dir=on Ftpd_full_access=on
5. Set VSFTP boot
Chkconfig vsftpd on
6. Add Firewall
Firewall-cmd--permanent--add-service=ftp
Firewall-cmd--reload
Thank you for reading, I hope to help you, thank you for your support for this site!