歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> vsftpd 500 OOPS: cannot change directory

vsftpd 500 OOPS: cannot change directory

日期:2017/3/2 10:00:23   编辑:關於Linux

vsftpd 500 OOPS: cannot change directory

今天在配置ftp時,所有配置完畢後,,啟動vsftpd,通過用戶登陸ftp,居然報錯:
C:\>ftp 10.10.1.239
Connected to 10.10.1.239
220 (vsFTPd 2.0.5)
User (10.10.1.239:(none)): xaftp
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/xaftp
Login failed.
ftp> ls
500 OOPS: child died
Connection closed by remote host.

覺得這個問題很奇怪,配置肯定沒問題,總是提示500 OOPS: cannot change directory:/home/xaftp

解決方法:
在終端輸入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
就OK了!

其實這是SELinux的設置命令.
其實 man 一下setsebool也知道了:
NAME
setsebool - set SELinux boolean value

在不熟悉SELnux前,把SELinux關掉也可以的。有時間研究下SELinux。
在想用SELinux但是又不熟悉的情況下可以把SELinux設置成Permissive,表示SELinux規則啟動,但只是把違規的記錄到log中。

Copyright © Linux教程網 All Rights Reserved