吴亦凡择偶大长腿:VsFTP出现500 OOPS: cannot change directory的解决办法

来源:百度文库 编辑:中财网 时间:2024/04/28 00:07:21

VsFTP出现500 OOPS: cannot change directory的解决办法



原出处:http://cocos.iteye.com/blog/1062366
    博客分类:
  • Linux
ftp服务器连接失败,错误提示:500 OOPS: cannot change directory:/home/*******
500 OOPS: child died
解决方法:在终端输入命令:setsebool ftpd_disable_trans 1
service vsftpd restart就OK了!


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_disa 

查看方法

[root@localhost vsftpd]# getenforce

Enforcing   如果出现(Enforcing )

关闭方法:[root@localhost vsftpd]#setenforce 0       (0|1  开|关)