VsFTP出現500 OOPS: cannot change directory的解決
作者:佚名 時間:2012-08-29 分享到:
cannot change directory:/home/***
ftp服務器連接失敗,錯誤提示:
500 OOPS: cannot change directory:/home/*******
500 OOPS: child died
500 OOPS: child died
解決方法:
在終端輸入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
service
就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
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
如沒特殊注明,文章均為上海聯楷網絡原創,轉載請注明來自:http://www.ktcbnqb.cn/contact/20151229/n7524.html