首页 > 技术文章 > Linux - SELinux

duchaoqun 2019-11-27 11:16 原文

SELinux

查看 SELinux 状态

[root@localhost ~]# 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
Max kernel policy version: 28

[root@rdo ~]# sestatus
SELinux status: disabled

关闭 SELinux 防护

# 永久关闭
[root@localhost src]# vi /etc/selinux/config
设置为disabled

# 临时关闭
[root@localhost ~]# setenforce 0

# 验证状态
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]#

推荐阅读