Wednesday, March 2, 2011

Vsftp 遇到 500 OOPS: cannot change directory

狀況是無法變更使用者home direcotory

首先一定要檢查目錄的權限

For example, if you are chroot jailing a particular user, given this entry from /etc/passwd:

username:x:100:200::/ftp/directory:/sbin/nologin
(where 100 = “username” and 200 = “somegroup”)

Make sure that the user and group permissions of the directory match what is set in /etc/passwd:


$ ls -lah /ftp/directory
drwxrwx--- 4 username somegroup 4.0K Mar 24 23:56 .


如果還是不行

以 root 登入,並下達下面指令後,重新啟動 vsftpd即可。

# setsebool ftpd_disable_trans 1
# /etc/init.d/vsftpd restart

No comments: