日期:2014-05-16  浏览次数:20686 次

配置vsftpd中出现setsebool: SELinux is disabled.
在配置完vsftpd后访问不成功,然后输入#getsebool -a|grep ftp 的命令显示setsebool:  SELinux is disabled.  这是为什么呀 恳请高手指点解决我这vsftpd的老大难问题 谢谢。。
------解决方案--------------------
先在vsftp服务器本机上用ftp命令试试看能不能正常登录,如果能用普通用户登录,在别的机器上不行那可能是防火墙的原因了(windows或linux的防火墙)


[root@RHEL6A Packages]# setenforce 0
[root@RHEL6A Packages]# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted
selinux在这个状态就应该可以访问了


------解决方案--------------------
不是让你先在本机上试试吗?一步步排除啊
------解决方案--------------------
感觉问题还是太复杂的话,把linux的防火墙停掉先吧
service iptables stop
------解决方案--------------------
前几天才装的rhel6上试的:
默认配置没改:
[root@RHEL6A ~]# grep -v ^# /etc/vsftpd/vsftpd.conf 
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

selinux状态
[root@RHEL6A ~]# getenforce
Permissive

linux本机测试:
[mike@RHEL6A ~]$ ftp localhost
Trying ::1...
ftp: connect to address ::1拒绝连接
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (localhost:root): mike
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls -a

停止防火墙:
[root@RHEL6A ~]# service iptables stop
iptables:清除防火墙规则:                                 [确定]
iptables:将链设置为政策 ACCEPT:filter                    [确定]
iptables:正在卸载模块:                                   [确定]

windows客户端测试:
连接到 192.168.88.101。
220 (vsFTPd 2.2.2)
用户(192.168.88.101:(none)): mike
331 Please specify the password.
密码:
230 Login successful.
ftp> ls -al
200 PORT command successful. Consider using PASV.