SElinux给各种设置带来的困扰
文章目录
#sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 31这表明SELinux已启动并正在运行。
要暂时禁用SELinux,请运行命令。
# setenforce 0另外,您可以运行命令。
# setenforce Permissive这些命令中的任何一个都将暂时禁用SELinux,直到下次重启为止。
如何在CentOS 8上永久禁用SELinux
# vi /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=disabled
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论