新架設完成的 vsfTPd FTP Server 連線時,出現 500 OOPS: cannot change directory:/root 的錯誤訊息,看起來應該是 SELinux 的問題,解決的方式有二個。
一個是關閉 SELinux
# vim /etc/selinux/config
把
SELINUX=enforcing
改成
SELINUX=disabled
重新開機即可,不過並不建議這種方式。
[@more@]第二種方式,開啟 SELinux 的設定中有關於 ftp 的部分權限
# sestatus -b | 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 off
ftpd_connect_db off
ftpd_use_fusefs off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off
tftp_use_cifs off
tftp_use_nfs off
# setsebool -P ftp_home_dir on
重新啟動 FTP Server 即可,如果還是不行,請再開啟下面的選項
# setsebool -P allow_ftpd_full_access on