linux_wiki:set_enforcing_and_permissive_modes_for_selinux

This is an old revision of the document!


Set Enforcing And Permissive Modes For Selinux

General Information

About this page/how-to/script.


Modes

  • Enforcing ⇒ SELinux is enabled and will restrict.
  • Permissive ⇒ SELinux is enabled and will log only. (Will not actually restrict anything)
  • Disabled ⇒ SELinux is disabled and will not log or restrict.


Get current SELinux mode

getenforce
OR
sestatus

Temporary: Set Permissive (Monitor and Report)

setenforce 0

Temporary: Set SELinux to Enforce

setenforce 1

Persistent: SELinux Config File

/etc/selinux/config
 
SELINUX=enforcing

  • linux_wiki/set_enforcing_and_permissive_modes_for_selinux.1456802161.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)