selinux配置文件 selinux配置文件路径

selinux配置文件 selinux配置文件路径

编码文章call10242024-12-29 1:46:5933A+A-

1.查看selinux模式

getenforce

SELinux 宽容模式(permissive) 强制模式(enforcing) 关闭(disabled) 几种模式之间的转换

setenforce 不用重启系统

setenforce 1 临时设置为enforcing模式

setenforce 0 临时设置为permissive模式

编辑配置文件,永久设置为enforcing模式

vi /etc/sysconfig/selinux

各位大佬是直接关闭selinux还是用semanage fcontext 手动配置selinux上下文呢?欢迎评论留言

点击这里复制本文地址 以上内容由文彬编程网整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!
qrcode

文彬编程网 © All Rights Reserved.  蜀ICP备2024111239号-4