红联Linux门户
Linux帮助

vsftpd 500 OOPS: cannot change directory

发布时间:2015-12-17 10:16:28来源:linux网站作者:chenpy

今天研究linux 的vsftpd 时发现什么都配好了,就是连不上服务器,原来是RedHad 的 SELinux 的设置问题。

vsftpd 500 OOPS: cannot change directory

#ftp 127.0.0.1
Connected to 127.0.0.1
220 (vsFTPd 2.0.5)
User (127.0.0.1:(root)): test
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/frank
Login failed.
ftp>


解决方法:
ref: http://hi.baidu.com/qhdinfo/blog/item/eee71e0e7abc25c97acbe17d.html
在终端输入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
就OK了!


这是SELinux的设置命令.
其实 man 一下setsebool也知道了:
NAME
setsebool - set SELinux boolean value
在不熟悉SELnux前,把SELinux关掉也可以的。有时间研究下SELinux。  

Redhat从FC3开始,就使用了SELinux来增强安全,但是使用起来有时候太繁琐,就想关闭它,但是如果安装服务器的时候开始没有图形界面,还真很难找到地方可以关闭。

正确方法如下:修改/etc/selinux/config文件中的SELINUX="" 为 disabled ,然后重启。


解决vsftp连接时的“500 OOPS:cannot change directory:/root”:http://www.linuxdiyf.com/linux/4110.html

500 OOPS:cannot change directory:/root:http://www.linuxdiyf.com/linux/14769.html