1.yum Install VSFTPD
2.chkconfig vsftpd on
3.service vsftpd Start
4.adduser-d/home/bp-g ftp-s/sbin/nologin bps, and enter the command: passwd bps to add a password to the account.
(/HOME/BP for its own FTP directory, bps for its own new FTP account)
5.vi/etc/vsftpd/chroot_list add bps to the inside, an account for one line, you can add more than one.
6. Edit Vi/etc/vsftpd/vsftpd.conf
Modify and add the following:
(1). Anonymous Access Forbidden: Anonymous_enable=no
(2). Restrict FTP users from accessing directories other than the home directory: Chroot_list_enable=yes
(3). Restrict FTP users from accessing directories other than the home directory user list: Chroot_list_file=/etc/vsftpd/chroot_list
(4). Turn on passive mode, better support FTP tools such as FLASHFXP, add at the bottom:
Pasv_enable=yes
pasv_min_port=20000 #开放的端口
pasv_max_port=20100
7. Turn on the firewall:/etc/sysconfig/iptables
Add the following content:
(1). Open 21 Port:-a input-m State--state new-m tcp-p TCP--dport 21-j ACCEPT
(2). Development 20000-20100 Port:-A Input-p tcp--dport 20000:20100-j ACCEPT
8. Restart the firewall: service iptables Restart Restart the VSFTPD server: service vsftpd restart
9. Input command: Setsebool-p ftp_home_dir on
10. Log in to FTP using the tool.
CentOS VSFTPD Build Fast Process