我在CentOS 5机器上,并尝试安装vsftpd。 我想使用setsebool -P ftp_home_dir on来configurationftp_home_dir setsebool -P ftp_home_dir on但它说:
setsebool: SELinux is disabled.
我尝试使用setenforce启用它仍然说:
setenforce: SELinux is disabled
然后我试着:
semodule -n -B
它说:
semodule: SELinux policy is not managed or store cannot be accessed.
我的configuration文件:
# 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 - SELinux is fully disabled. SELINUX=permissive # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted
注意:重新启动很多次。
您正在使用的内核是在没有SELinux支持的情况下构build的。 使用库存核心将不包括您的VPS适当的部分。 用SELinux支持重build内核将导致VPS部分无法工作。 你不能在你的VPS上使用SELinux。
您的VPS在OpenVZ上运行,这是一个基于容器的“虚拟化”,不支持SELinux。 如果您需要SELinux,则需要切换到另一个支持SELinux的虚拟机pipe理程序,例如Hyper-V,VMware,KVM,Xen以及其他可能的虚拟机。