FTP出现500 OOPS: cannot change directory
出自新浪 http://blog.sina.com.cn/s/blog_4563cd990100loaw.htmlcannot change directory:/home/***ftp服务器连接失败,错误提示:500 OOPS: cannot change directory:/home/*******500 OOPS: child died解...
出自新浪 http://blog.sina.com.cn/s/blog_4563cd990100loaw.html
cannot change directory:/home/***
ftp服务器连接失败,错误提示:
500 OOPS: cannot change directory:/home/*******
500 OOPS: child died
解决方法:
在终端输入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
就OK了!
在安装完vsftp服务后登陆时可能遇到cannot change directory后面是登陆者的目录的错误。这是因为SE设置的关闭了ftp的原因。 使用命令 getsebool ftpd_disable_trans 可以查看当前的状态如果不是on 那么是输入命令 setsebool ftpd_disable_trans 1 当然也可以加入-P参数 以便不需要每次开机都输入这个命令 setsebool -P ftpd_disable_trans 1 同理 如果smb服务也遇到相同的问题
在安装完vsftp服务后登陆时可能遇到cannot change directory后面是登陆者的目录的错误。这是因为SE设置的关闭了ftp的原因。
使用命令
getsebool ftpd_disable_trans
可以查看当前的状态如果不是on
那么是输入命令
setsebool ftpd_disable_trans 1
当然也可以加入-P参数 以便不需要每次开机都输入这个命令
setsebool -P ftpd_disable_trans 1
同理 如果smb服务也遇到相同的问题 ,也可以这么做。
setsebool -P samba_enable_home_dirs=1
selinux的问题也可以使用 管理工具中的 selinux management 来调整相关设置。
FTP登录时错误信息:
500 OOPS: cannot change directory:/home/xxxxLogin failed.
421 Service not available, remote server has closed connection
开始以为是权限问题,将home/xxxx chmod为777,vsftpd配置文件全开依然不行。
百度一下查处原因:
==================================
I found information at the NSA that indicates you can disable SELinux protection of the ftp daemon.
setsebool -P ftpd_disable_trans 1
This seems a bit drastic. It certainly works for now though.
==================================
原来是新装系统RHEL5 增强的系统安全SELinux在作怪,关掉SELinux对FTP Daemon的保护就OK了:
# setsebool ftpd_disable_trans 1
# service vsftpd restart
转载于:https://blog.51cto.com/holy2010/461018
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐


所有评论(0)