How to? Enable SELinux in CentOS 7

SELinux is a security feature available in Linux kernel and by default it is set to disabled.

SELinux feature has 3 modes:

  • enforcing mode
  • passive mode
  • disabled mode

To check the current mode type-in the following command

estatus

by default it will show as SELinux=disabled

Steps to enable SELinux

Change the status of SELinux service in the /etc/selinux/config file.

vim /etc/selinux/config

You can now change the SELinux mode SELinx=disabled to either enforcing or permissive.

Now enter :wq to save the edit.

reboot

Check the status of SELinux mode by entering

sestatus

Similar Posts