个人备忘,关键是selinux的配置,否则无法登录
环境:CentOS 6.4 x86_64(VMware)
Server:vsftpd
Client:ftp(base.repo)
1. 安装软件包:
yum install vsftpd yum install ftp
2. 配置server开机自启:
chkconfig --level 2345 vsftpd on
3. 配置selinux:
$ getsebool -a|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 ftpd_use_passive_mode --> off httpd_enable_ftp_server --> off tftp_anon_write --> off $ sudo setsebool ftp_home_dir 1 $ sudo setsebool ftpd_use_passive_mode 1
否则连接时会出现如下错误:
500 OOPS: cannot change directory:/home/chenshu Login failed.
客户端无需配置。
注:vsftpd的详细配置文件为/etc/vsftpd/vsftpd.conf