Build vsftpd server in centos 6.2
First check whether FTP is installed:Rpm-Qa | grep vsftpd
1. If the installed centos does not have the FTP command, it is likely that this step is ignored during the installation process.Yum install vsftpd(Use Yum install vsftpd when centos can connect to the Internet)
2. If "-Bash: ftp: Command not found" still appears when you use the FTP command, the cause may be that the related package is not installed, just enter:
Rpm-uvh http://mirror.centos.org/centos/6/ OS /i386/Packages/ftp-0.17-51.1.el6.i686.rpm
3. after completing the above steps, check whether the FTP + (Linux) IP address of the client can be connected. If there are two possibilities, one is that the two machines are not connected, the other is that the server exists.Firewall, RememberTurn Off, The simple method is to input:Service iptables stop
4. By default, the root account is not allowed to upload files.
Implement root permission upload:
/Etc/vsftpd/VI user_list root comment out
/Etc/vsftpd/VI ftpusers root comment out
5. Frequent Logon:
500 Oops: cannot changedirectory:/root
Operation:
# Sestatus-B | grep FTP
Allow_ftpd_anon_write off
Allow_ftpd_full_access off
Allow_ftpd_use_cifs off
Allow_ftpd_use_nfs off
Ftp_home_dir off
Ftpd_connect_db off
Httpd_enable_ftp_server off
Tftp_anon_write off
# Setsebool-P ftp_home_dir on
# Service vsftpd restart
6. After the operation is complete, the basic FTP server is set up. You can download client software such as LeapFTP and CuteFTP for upload and download. If you can only download files and cannot upload files, it is likely that SELinux is not disabled. Enter the following command:Setenforce 0OK
Requirement 1: Anonymous Users are allowed to upload files, create directories, delete files, and rename files.
Anonymous_enable = yes # whether anonymous users are allowed to log on
Local_eanble = yes # allow local users to log on
Write_enable = yes # Whether to enable write permission for Local Users
Anon_upload_enable = yes # Whether to enable the upload permission of Anonymous Users
Anon_mkdir_write_enable = yes # Whether to enable write permission for anonymous users, such as creating a directory
Anon_other_write_enable = yes # whether anonymous users are allowed to delete files and rename files (if needed)
After modifying these configurations, you must:Service vsftpd restart
2. Because the default character set in Linux vsftpd is UTF-8, and the default character set in Windows is GBK, so when you browse Chinese files in Linux under Windows, garbled
Solution: Modify the character set of the Windows FTP client software to a UTF-8
3. default directory
Installation Directory ETC/vsftpd
Upload/download directory/var/FTP/pub
4. Client Software upload error:
553 cocould not create file.
The reason is: no write permission.
Solution: chmod 777/var/FTP/pub
It may also be: setenforce 0
5. auto start:
Chkconfig vsftpd on