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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM