非欧几何的灵感

——限量版Hello World
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

vsftpd 500 OOPS: cannot change directory

Posted on 2009-05-31 16:06  Neon∮Light  阅读(1101)  评论(0编辑  收藏  举报
vsftpd 500 OOPS: cannot change directory
 
今天在默认配置下,启动vsftpd,一般用户登陆居然报错:
C:\>ftp 192.168.0.101
Connected to 192.168.0.101.
220 (vsFTPd 2.0.5)
User (192.168.0.101:(none)): frank
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/frank
Login failed.
ftp> ls
500 OOPS: child died
Connection closed by remote host.
 
觉得这个问题很奇怪,google.cn了一下,有人的解决方法是:
解决方法:
ref: http://hi.baidu.com/qhdinfo/blog/item/eee71e0e7abc25c97acbe17d.html
在终端输入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
就OK了!
 
作者没说为什么,后来google.com后才发现这是SELinux的设置命令.
其实 man 一下setsebool也知道了:
NAME
       setsebool - set SELinux boolean value
 
在不熟悉SELnux前,把SELinux关掉也可以的。有时间研究下SELinux。  
在想用SELinux但是又不熟悉的情况下可以把SELinux设置成Permissive,表示SELinux规则启动,但只是把违规的记录到log中。