Linux SELinux 使用操作
Linux SELinux 使用操作
- # 临时修改SELinux启动模式
- setenforce [0|1]
- 0:转成 permissive 宽容模式;
- 1:转成 Enforcing 强制模式;
- # 永久修改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
配置文件
- # 查看当前SELinux模式
- getenforce
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

更多精彩