1. install FTP through Yum install-y vsftp
2. Modify VI/etc/vsftpd. conf, enable chroot_list_enabled = Yes, and enable chroot_list_file =/etc/vsftpd/chroot_list.
3. Create an FTP user:
Useradd-D/home/ftp-g ftp-S/sbin/nologin ftptest
Passwd: ftptest
4. Firewall needs to be configured
Open the/etc/sysconfig/iptables File
VI/etc/sysconfig/iptables
Add the following code before the reject line:
-A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 21-J accept
Then restart the firewall. Because the centos firewall command has been changed to firewalld, the command has been changed:
Service firewalld start/restart/stop
5. Authorize chmod 777/home/FTP/* To/home/ftp /*
Cancel the root directory permission chmod A-W/home/ftp
PS: Disable The SELinux Method
# Vi/etc/SELinux/config
Set SELinux = xxx --> XXX to the level
Change
SELinux = disabled
Centos7 vsftpd Installation