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

简介:

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

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

service vsftpd restart

同理 如果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


本文转自gaodi2002 51CTO博客,原文链接:http://blog.51cto.com/gaodi2002/1618154

相关文章
|
5月前
|
Ubuntu Unix Linux
Linux 用户使用sudo时 显示xxx is not in the sudoers file.This incident will be reported.的解决方法
注意,在Ubuntu系统下,Unix操作系统并没有为root创建密码,需要使用sudo passwd root来为root用户配置密码,之后才可以登入。
38 0
|
关系型数据库 MySQL Unix
mysqld_safe: command not found 解决方法
mysqld_safe: command not found 解决方法
1310 0
|
8月前
|
Ubuntu Linux
No manual entry for ls解决办法
No manual entry for ls解决办法
is not in the sudoers files的解决办法
is not in the sudoers files的解决办法
55 0
|
数据安全/隐私保护
提示 you neet to root to perform this command 的解决办法
提示 you neet to root to perform this command 的解决办法
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
417 0
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
|
关系型数据库 MySQL
mysql配置完半同步复制之后报错[ERROR] The server quit without updating PID file
修改配置,MySQL启动报:[ERROR] The server quit without updating PID file     [root@localhost mysql]# /etc/init.
1985 0
|
数据安全/隐私保护
Linux_服务器_03_xxx is not in the sudoers file.This incident will be reported.的解决方法
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去.2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL ...
927 0

热门文章

最新文章