How To Disable or Enable Selinux?
I have fedora desktop. I want to run some services but I get error about selinux. How can I disable selinux?
Selinux is a security mechanism used generally linux systems. It has support from linux kernel. Selinux create context for specified services, applications and users. Prevent these to access unrelated or unsecure part of the linux systems. In this tutorial we will look how to disable and enable selinux temporary or persistently.
Get Status Of SELinux
We will get selinux status.
SELinux status: disabled
Disable SELinux Persistently
We can disable SELinux persistenly by changing /etc/selinux/config
Open file with nano. We need to be root to edit this file.
$ nano /etc/selinux/config
We will se following lines. To disable SELinux SELINUX=disabled
After this please reboot the system.
# 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.
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
Enable SELinux Persistently
Similar to the disable we will change above configuration file SELINUX=enforcing