Vsftp is the most respected FTP server program in the Linux distribution. Features are small and light, safe and easy to use. The following is an introduction to CentOS under Installation and simple configuration vsftp this service software.
The local yum library can be built under Linux to install and manage the system software. Here are not many explanations, please see the Linux system to build a local Yum library article.
1, installation vsftp:
Execute the following command as Administrator (root):
Yum Install vsftpd
2. Configure the VSFTPD server:
The default configuration file is/etc/vsftpd/vsftpd.conf, which you can open with a text editor.
Vi/etc/vsftpd/vsftpd.conf
3. Add FTP Users:
Here is the Add Ftptest user, set the root directory to/home/wwwroot/ftptest, prevent this user from logging on to SSH, and restrict access to other directories.
①, modify/etc/vsftpd/vsftpd.conf
Chroot_list_enable=yes
Chroot_list_file=/etc/vsftpd/chroot_list
②, add user ftptest, point to directory/home/wwwroot/ftptest, prohibit login ssh permissions.
useradd-d/home/wwwroot/ftptest-g ftp-s/sbin/nologin ftptest
③, set User password
passwd Ftpuser
④, edit file Chroot_list
Vi/etc/vsftpd/chroot_list
The content is an FTP user name, one row per user, such as:
Wenvki
⑤, start vsftp service
Service VSFTPD Start
4. Configure the Firewall
Open/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
Save and close files, restart firewall
Service Iptables Restart
5, the management of VSFTPD services related commands:
Stop VSFTPD Services: Service VSFTPD stop
Restart VSFTPD Services: Service vsftpd restart
Set Boot VSFTPD service: chkconfig--level 2345 vsftpd on
Finally, the use of user ftptest to log on to the VSFTP service test has an error message:
Oops:cannot Change Directory:/home/wwwroot/ftptest
CentOS Installation Vsftp