selinux

 

共3种模式, disable, permissive, enforcing

 

where is logs:

/var/log/audit/audit.log

 

查看模式:

sestatus 

 

put SELinux in permissive mode

#setenforce 0

 
put SELinux in enforcing mode
#setenforce 1
 
 

enable 模式下可以动态切换 Permissive 和 Enforcing, 但是要切换 enable 和 disable 就要在配置文件里改,然后重启.
配置文件:
/etc/sysconfig/selinux

 

 SELinux context (user, role, type and sensitivity)

 

 

 
 

ref:

https://www.computernetworkingnotes.com/linux-tutorials/selinux-explained-with-examples-in-easy-language.html

https://mp.weixin.qq.com/s/oza7Uk8XRZt81LjpxcSXMA,这个系列课程能覆盖所有的内容

https://www.bilibili.com/video/BV1fk4y1B7cB/?spm_id_from=333.337.search-card.all.click, 

posted @ 2022-08-04 20:22  mashuai_191  阅读(28)  评论(0编辑  收藏  举报