您的位置:首页 > 运维架构 > Linux

500 OOPS:cannot change directory:/root 问题 linux

2010-04-21 11:12 447 查看
系统:red hat enterprise linux 5

今天按照网上的方法配置了一个vsftp,匿名时可以
访问,但是用root访问时报500 错误,错误如下:

Connecting to 192.168.0.16 , 15 dec 2009
09:35:27

< 220 (vsFTPd 2.0.5)

> USER test

< 331 Please
specify the password.

> PASS (hidden)

< 500 OOPS: cannot
change directory:/root

< 500 OOPS: child died

Connection closed

500
OOPS: child died

但在网上找了一些方法解决:

解决:

1、 查看 SELinux 的状态:
sestatus -b | grep ftp 确切地说,只是查看了ftp的状态。

2、 在出现的结果中可以看到
ftp_home_dir off

tftpd_disable_trans off

之类。我们现在只要把其中之一设置为on就可以啦。

3、
setsebool -P ftpd_disable_trans on 或者 setsebool -P ftp_home_dir
on

4、 重启vsftpd: service vsftpd restart

按照上面的方法:当输入
setsebool -P ftpd_disable_trans on 时报错,错误如下 :

Usage: setsebool [
-P ] boolean value | bool1=val1 bool2=val2...

我用man方法看一下setsebool文
档:

NAME

setsebool - set SELinux boolean value

SYNOPSIS

setsebool [ -P ] boolean value | bool1=val1 bool2=val2 ...

输入
setsebool ftpd_disable_trans on即可完成更改。

如果对于selinux不是很熟悉或者问题无法得
到解决,关闭selinux,也可让vsftp正常使用.

关闭方法:修改/etc/selinux/config文件中的
SELINUX=”" 为 disabled ,然后重启

原文地址 http://reason2003.blog.163.com/blog/static/11649946920091115103017836/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐