Linux SELinux 使用操作
- # 修改 SELinux 启动模式、临时生效
- 命令:setenforce [0|1]
- 0:转成 permissive 宽容模式;
- 1:转成 Enforcing 强制模式;
- # 查看 当前 SELinux 模式
- 命令:getenforce
- # 修改 SElinux 启动模式、永久生效 重启生效
- 命令:vim /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=enforcing # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted