Linux SELinux 使用操作


  • # 修改 SELinux 启动模式、临时生效
  • 命令:setenforce [0|1]
  • 0:转成 permissive 宽容模式;
  • 1:转成 Enforcing 强制模式;

  • # 查看 当前 SELinux 模式
  • 命令:getenforce

  • # 修改 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
    配置文件

相关文章:

  • 2021-09-26
  • 2021-10-10
  • 2021-09-13
  • 2021-12-05
  • 2022-01-19
  • 2022-01-08
  • 2021-07-21
猜你喜欢
  • 2021-06-30
  • 2021-11-04
  • 2021-10-14
  • 2021-07-08
相关资源
相似解决方案