setenforce:SELinux 被禁用

Can*_*liş 4 linux selinux centos ftp

我在 CentOS 5 机器上,并尝试安装 vsftpd。我想配置ftp_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.

我的配置文件:

# 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
Run Code Online (Sandbox Code Playgroud)

注意:重启了很多次。

Mic*_*ton 10

您的 VPS 在 OpenVZ 上运行,OpenVZ 是一种基于容器的“虚拟化”,不支持 SELinux。如果您需要 SELinux,则需要切换到另一个支持来宾中的 SELinux 的虚拟机管理程序,例如 Hyper-V、VMware、KVM、Xen 和其他可能的虚拟机管理程序。


Ign*_*ams 7

您使用的内核是在没有 SELinux 支持的情况下构建的。使用库存内核不会包含适用于您的 VPS 的部件。使用 SELinux 支持重建内核将导致 VPS 部分无法工作。您不能在 VPS 上使用 SELinux。