1. Install vsftp. I will not talk about it much. I use Ubuntu, And I will simply use apt-Get.
2. Configure vsftpd. conf, VIM/etc/vsftpd. conf
The following describes the important options.
1 anonymous_enable = No # anonymous users are not allowed 2 3 local_enable = yes # allow users to log on to 4 5 write_enable = yes # allow ftp users to write data 6 7 connect_from_port_20 = yes # pass 20 port Data Transmission 8 9 chroot_local_user = yes # Lock the user in the home directory, for example,/home/ftpuser, in this way, the ftpuser user cannot access the 10 11 chroot_list_enable = yes # enable and disable the user's list in the main directory 12 13 chroot_list_file =/etc/vsftpd. chroot_list # This list takes effect when chroot_list_enable is enabled. users in the list will not be locked. The format is one user name per row.
3. Create a user group
1 groupadd ftpgroup2 3 useradd ftpuser-G ftpgroup-D/home/ftpuser-M # create a group as ftpgroup, and the home directory is/home/ftpuser, -M: the home directory is not created for the system, because 4 5 usermod-S/usr/sbin/nologin ftpuser has been specified before # Set ftpuser as unavailable for normal user login
4. Start vsftp
1/etc/init. d/vsftpd start
5. log on to filezilla or enter the IP address of your FTP server in your browser.