Redhat 5 Vsftp 550 failed to change directory問題解決 結果測試的時候發現ftp localhostftp> cd cdrom550 Failed to change directory.無法切換目錄到/pub/cdrom www.2cto.com 原因是SElinux的FTP傳輸審核功能禁止切換目錄 解決辦法:1. /etc/sysconfig/selinux上禁用之,重啟Linux生效 2. 不重啟linux,臨時停用selinux的辦法, 1/usr/sbin/setenforce 0 3. 禁用SElinux的FTP傳輸審核功能 www.2cto.com 1/usr/sbin/setsebool -P ftpd_disable_trans2service vsftpd restart 使用getsebool -a | grep ftp命令找到ftp的bool值匿名上傳setsebool -P allow_ftpd_anon_write on禁用ftp傳輸審核setsebool -P ftpd_disable_trans on 01sestatus02[root@xen ~]# sestatus03SELinux status: enabled04SELinuxfs mount: /selinux05Current mode: permissive06Mode from config file: enforcing07Policy version: 2108Policy from config file: targeted09 10[root@xen ~]# getsebool -a | grep ftp11allow_ftpd_anon_write --> off12allow_ftpd_full_access --> off13allow_ftpd_use_cifs --> off14allow_ftpd_use_nfs --> off15allow_tftp_anon_write --> off16ftp_home_dir --> off17ftpd_disable_trans --> off18ftpd_is_daemon --> on19httpd_enable_ftp_server --> off20tftpd_disable_trans --> off21[root@xen ~]# setsebool -P ftpd_disable_trans on22[root@xen ~]# service vsftpd restart