为解决RHEL6下VSFTP访问报500 OOPS: cannot change directory的问题,顺带了解了一下SELinux.
诊断SELinun导致的网络异常问题
setenforce 0 关闭SELinux(重启系统会恢复到enforce状态),然后观察网络应用是否有异常。如果仍然异常,时问题的原因不在SELinux。
getsebool -a |grep ftp
setsebool -p ftp_home_dir 1
查看SELinux状态
getenforce
关闭SELinux
vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
相关命令
getsebool
setsebool
阅读(1805) | 评论(0) | 转发(0) |