Monday, May 27, 2013

SELinux configuration

Temporarily switch off enforcement:
To check what mode the system is in,
cat /selinux/enforce
which will print a "0" or "1" for permissive or enforcing.
You can switch the system into permissive mode with the following command:
echo 0 >/selinux/enforce
Permanently Permissive
The above will switch off enforcement temporarily - until you reboot the system. If you want the system to always start in permissive mode, then here is how you do it, In Fedora, edit /etc/selinux/config and just change SELINUX=enforcing to SELINUX=permissive, and you're done.
Fully Disabling SELinux:
Fully disabling SELinux goes one step further than just switching into permissive mode. Disabling will completely disable all SELinux functions including file and process labelling.
In Fedora, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled

No comments: