226 Transfer done (but failed to open directory).(传输完成,但是打开路径失败)
550 Failed to change directory(更改路径失败)
553 Could not create file.
SELinux 主要作用就是最大限度地减小系统中服务进程可访问的资源(最小权限原则)
解决方案:
关闭SELinux简单粗暴,命令:
sudo vim /etc/selinux/config
将selinux设置为disabled。
2. 对防火墙策略进行设置(推荐,上面那种方式太野蛮了):
注意:方案2要在在方案1中的selinux=able的情况下使用使用,否则会提示:getsebool: SELinux is disabled,无法进行接下来的步骤
setenforce 0 #暂时让SELinux进入Permissive模式
运行getsebool -a | grep ftpd
getsebool -a | grep ftpd
#以下是显示出来的权限,off是关闭权限,on是打开权限
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftpd_connect_db --> off
ftpd_use_passive_mode --> off
ftp_home_dir --> off