我想在我的 VPS 上启用 SELinux,但我无法做到。
在/etc/selinux/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=permissive
# SELINUXTYPE= can take one of these two values:
# default - equivalent to the old strict and targeted policies
# mls - Multi-Level Security (for military and educational use)
# src - Custom policy built from source
SELINUXTYPE=default
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
如您所见,我没有disabled
在配置文件中将其设置为。但它被禁用了:
root@vpsxxxxx:/home/username# sestatus
SELinux status: disabled
我从提供商的网站客户端界面重新启动了 VPS,但它仍然被禁用。
答案1
哪个软件实现你的 VPS?也许是 OpenVZ?OpenVZ 与 selinux 不兼容https://wiki.centos.org/HowTos/Virtualization/OpenVZ