我在带有 LAMP 堆栈的 CentOS 6.9 上,尝试设置 SELinux = enforcing,/etc/selinux/config
但是在 **重新启动** 并检查后sestatus
我仍然得到SELinux status:disabled
然后我尝试运行setenforce Permissive
它返回setenforce: SELinux is disabled
它也setsebool httpd_can_sendmail 1
返回相同的消息我验证了 配置文件内容
之间的链接:ln -s /etc/selinux/config /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 - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
为什么命令不起作用?如何启用 SELinux?
编辑,我尝试启用 SELinux 的原因是因为这篇文章:https://stackoverflow.com/questions/8341678/php-mail-function-not-working-on-centos-server
来自cat /proc/cmdline
ro root=/dev/mapper/VolGroup00-LogVol00 rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=VolGroup00/LogVol01 rd_LVM_LV=VolGroup00/LogVol00 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=129M@48M rhgb quiet rd_NO_DM rhgb quiet vga=791