selinux设置

永久设置

查看selinux

查看/etc/selinux/config文件

#enforce:开启;disabled:关闭;premissive:关闭但有警告提示 [root@localhost ~]# cat /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 these three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # ukmls - Multi Level Security protection. # ukmcs -ukmcs variants of the SELinux policy. SELINUXTYPE=ukmcs # SETLOCALDEFS= Check local definition changes SETLOCALDEFS=0

关闭selinux

将/etc/selinux/config文件的SELINUX选项改为disabled

[root@localhost ~]# 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=disabled # SELINUXTYPE= can take one of these three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # ukmls - Multi Level Security protection. # ukmcs -ukmcs variants of the SELinux policy. SELINUXTYPE=ukmcs # SETLOCALDEFS= Check local definition changes SETLOCALDEFS=0

提示selinux

将/etc/selinux/config文件的SELINUX选项改为permissive

[root@localhost ~]# 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=permissive # SELINUXTYPE= can take one of these three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # ukmls - Multi Level Security protection. # ukmcs -ukmcs variants of the SELinux policy. SELINUXTYPE=ukmcs # SETLOCALDEFS= Check local definition changes SETLOCALDEFS=0

开启selinux

将/etc/selinux/config文件的SELINUX选项改为enforcing

[root@localhost ~]# 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 these three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # ukmls - Multi Level Security protection. # ukmcs -ukmcs variants of the SELinux policy. SELINUXTYPE=ukmcs # SETLOCALDEFS= Check local definition changes SETLOCALDEFS=0

__EOF__

本文作者应鑫
本文链接https://www.cnblogs.com/yingxin20000303/p/16649274.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   (应鑫)  阅读(244)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示