1. Operating System: Red Hat guest iselinux server 6.4
2. vsftpd-2.2.2-11.el6.x86_64.rpm
1. rpm-IVH vsftpd-2.2.2-11.el6.x86_64.rpm -- force # force option ensures successful installation
2. rpm-e vsftpd-2.2.2-11.el6.x86_64 # uninstall vsftpd
3. Other uninstall Methods: Find/-name vsftpd, and then RM retrieves the file
1. Create an FTP user
2. Change port 21 to 678.
Add listen_port = 678 to the configuration file.
VI/etc/services, change FTP 21/tcp to FTP 678/tcp, and change ftp21-udp to FTP 678/udp
3. Set other options in vsftpd
Anonymous_enable = Yes
Local_enable = Yes
Write_enable = Yes
Local_umask = 022
Anon_upload_enable = Yes
Anon_mkdir_write_enable = Yes
Dirmessage_enable = Yes
Xferlog_enable = Yes
Connect_from_port_20 = Yes
Chown_uploads = Yes
Chown_username = FTP
Xferlog_file =/var/log/xferlog
Xferlog_std_format = Yes
Chroot_local_user = Yes
Listen = Yes
Pam_service_name = vsftpd
Userlist_enable = Yes
Tcp_wrappers = Yes
Listen_port= 834
4. Configure the FTP File Upload path
VI/etc/passwd
FTP: X: 14: 50: ftpuser:/home/ftp:/sbin/nologin # Home/FTP is the path of the uploaded file
The access permission for the upload file is changed to 755, but not 777;
Create an upload subdirectory under the uploaded file and grant permissions to it.
Chown ftp: Root. chmod755 ftp: Root.
5. Upload permission settings (unable to upload, caused by SELinux (Security-enhancedlinux)
Setsebool-P ftpd_disable_trans 1
Setsebool ftp_use_passive_mode 1
Setsebool ftpd_use_passive_mode 1
Setsebool httpd_enable_ftp_server 1
Setsebool tftp_anon_write 1
Setsebool allow_ftpd_anon_write 1
Setsebool allow_ftpd_use_cifs 1
Setsebool ftpd_connect_db 1
Setsebool allow_ftpd_use_nfs 1
6. If the problem persists, disable the firewall)
1. Service vsftpd start # Start the vsftpd service
2. Service vsftpd stop # Stop the vsftpd service
3. Service vsftpd restart # restart the vsftpd service
1. test whether the service is started and whether the port is listening? Netstat-ntpl | grep vsftpd
2. getsebool-A | grep FTP # view the setting status
3. Service iptables status # view the Firewall Status
4. FTP
5. Open xxx
6. Put xxx
OK!
This article is from the blog of "Yi Zi AK's blog", please be sure to keep this source http://lifudong.blog.51cto.com/2357095/1562291
Vsftpd installation and configuration experience