寻觅生命中的那一片浅草......

VsFTP出现500 OOPS: cannot change directory

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

原文链接:http://blog.chinaunix.net/u/8463/showart.php?id=1423508

尚无评论

发表评论

2024年四月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930