Redhat 5 Vsftp 550 failed to change directory问题解决
Redhat 5 Vsftp 550 failed to change directory问题解决
Redhat 5 Vsftp 550 failed to change directory问题解决
结果测试的时候发现
ftp localhost
ftp> cd cdrom
550 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_trans
2
service vsftpd restart
使用getsebool -a | grep ftp命令找到ftp的bool值
匿名上传setsebool -P allow_ftpd_anon_write on
禁用ftp传输审核setsebool -P ftpd_disable_trans on
01
sestatus
02
[root@xen ~]# sestatus
03
SELinux status: enabled
04
SELinuxfs mount: /selinux
05
Current mode: permissive
06
Mode from config file: enforcing
07
Policy version: 21
08
Policy from config file: targeted
09
10
[root@xen ~]# getsebool -a | grep ftp
11
allow_ftpd_anon_write --> off
12
allow_ftpd_full_access --> off
13
allow_ftpd_use_cifs --> off
14
allow_ftpd_use_nfs --> off
15
allow_tftp_anon_write --> off
16
ftp_home_dir --> off
17
ftpd_disable_trans --> off
18
ftpd_is_daemon --> on
19
httpd_enable_ftp_server --> off
20
tftpd_disable_trans --> off
21
[root@xen ~]# setsebool -P ftpd_disable_trans on
22
[root@xen ~]# service vsftpd restart
评论暂时关闭