Selinux的三种模式宽容模式(permissive)强制模式(enforcing)关闭(disabled)

1、vim /etc/selinux/config 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected, 目标流程受保护
# minimum - Modification of targeted policy. Only selected processes are protected. 选定的受保护
# mls - Multi Level Security protection. 多级安全保护
SELINUXTYPE=targeted

enforcing:强制模式,代表Selinux运行中,
permissive:
disabled:

临时更改Seinux的模式:
setcnforce 0 临时关闭
setenforce 1 临时打开

查看selinux状态

sestatus

posted @ 2019-06-08 16:09  晚生隆海  阅读(3707)  评论(0编辑  收藏  举报