vsftpd 500 OOPS: cannot change directory解决


vsftpd 500 OOPS: cannot change directory解决
 
今天有台机器由于hang住了进行重启,重启之后发现ftp不好使,开始以为是ftp服务不随机器一起启动,结果就 重启了下。不过问题还是没解决,依然不好使,报500 OOPS: cannot change directory 这个错误。铜鼓半天,才发现由于selinux原因。
 
进入到/etc/selinu/下。查看config文件,发现
# 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=enforcing  ---多出了一行,这行与下面一样,而且这样赋值是错的。就注释掉了
 
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 
SELINUX=disabled
 
更改之后,由于暂时不能重启机器,就用setenforce 0  让它暂时生效。
 
后来仔细查百度才知道
SELINUX有「disabled」「permissive」,「enforcing」3种选择。
Disabled就不用说了,permissive就是Selinux有效,但是即使你违反了策略的话它让你继续操作,但是把你的违反的内容记录下来。在我们开发策略的时候非常的有用。
 
相当于Debug模式。
Enforcing就是你违反了策略,你就无法继续操作下去。
SELINUXTYPE呢,现在主要有2大类,一类就是红帽子开发的targeted,它只是对于,主要的网络服务进行保护,比如 apache,sendmail,bind,postgresql等,不属于那些domain的就都让他们在unconfined_t里,可导入性高,可用性好但是不能对整体进行保护。
 

相关内容

    暂无相关文章