Install and configure the ftp server in vsftpd in Linux
1. Install vsftpd
# Yum install vsftpd
2. Start vsftpd
# Service vsftpd start
3. Disable the Firewall
# Service iptables stop
At this time, you can log on anonymously.
4. Disable selinux.
# Vi/etc/selinux/config
SELINUX = disabled
# Setenforce 0
5. Create a user
Because vsftpd does not allow logon by the root user by default, you must create a new user.
# Useradd doiido
# Passwd
6. Create a specified directory and grant permissions
# Mkdir-p/doiido/web/www
# Chmod 777/doiido/web/www/
7. modify the configuration file
# Vi/etc/vsftpd. conf
# Delete all objects, then add the following parameter export = NOlocal_enable = YESwrite_enable = YESlocal_umask = affinity = YESlisten = YESpam_service_name = affinity = YESchroot_local_user = localyes_root =/doiido/web/www
8. Restart the vsftpd service.
# Service vsftpd restart
At this time, you can use a local user to log on, and the user is locked in the/doiido/web/www directory after logon.
9. Set auto-start upon startup
# Chkconfig vsftpd on
In this way, you do not need to start vsftpd every time you start the instance.