歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux維護 >> Linux Vsftp報錯500 OOPS如何修復

Linux Vsftp報錯500 OOPS如何修復

日期:2017/3/2 10:28:45   编辑:Linux維護

一些Linux用戶在使用vsftp時,遇到了vsftp 500 OOPS: cannot change directory:/home/這個問題,因此,今天小編特地為大家帶來了這個問題的解決方法,如果你還不知道怎麼解決的話,那就來看看吧。

安裝好vsftp軟件後,鏈接ftp登陸後提示這樣的錯誤

500 OOPS: cannot change directory:/home/

原因是CentOS系統安裝了SELinux,因為默認下是沒有開啟FTP的支持,所以訪問時都被阻止了。

解決辦法

//查看SELinux設置

# getsebool -a|grep ftp

ftpd_disable_trans –> off

或者

ftp_home_dir–>off

//使用setsebool命令開啟

# setsebool ftpd_disable_trans 1

或者

# setsebool ftp_home_dir 1

//查看當前狀態是否是on的狀態

# getsebool -a|grep ftp

ftpd_disable_trans –> on

或者

ftp_home_dir–>on

//setsebool使用-P參數,無需每次開機都輸入這個命令

# setsebool -P ftpd_disable_trans 1

或者

# setsebool -P ftp_home_dir 1

我的SELinux設置如下

[root@localhost ~]# getsebool -a|grep ftp

allow_ftpd_anon_write –> off

allow_ftpd_full_access –> off

allow_ftpd_use_cifs –> off

allow_ftpd_use_nfs –> off

ftp_home_dir –> on

ftpd_connect_db –> off

ftpd_use_passive_mode –> off

httpd_enable_ftp_server –> off

tftp_anon_write –> off

# service vsftpd restart

以上就是解決vsftp 500 OOPS: cannot change directory:/home/的方法了,有遇到這個問題的用戶,不妨試試這個方法吧,相信會對你有所幫助。

Copyright © Linux教程網 All Rights Reserved