I'm running SELinux on CentOS 6.5. In /etc/sysconfig/selinux I have set SELINUX=permissive. But everytime the system starts, sudo getenforce shows SELinux as Enforcing. What could be causing it to go into enforcing mode?

sestatus shows the following:

SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

2 Answers 2


Do sestatus and see what it says for "Mode from config file". If it says "permissive" there, then something else sets enforcing -- either during the boot-up process, or via the kernel command line (look for enforcing=1 in /etc/grub.conf).

  • Thanks. I edited my question to include the output of sestatus. It shows that the mode from the config file is enforcing. I also verified grub.conf does not have enforcing=1. Is there another config file it could be using?
    – Ben
    Commented Dec 29, 2014 at 16:46
  • 1
    Can you verify that your /etc/sysconfig/selinux is a symlink to /etc/selinux/config (that's the file that actually matters)?
    – mricon
    Commented Dec 29, 2014 at 16:48
  • I was actually just checking that as you were typing it. There was no symlink. I created it, modified the config file again to set it to permissive, and rebooted. Now it works as expected.
    – Ben
    Commented Dec 29, 2014 at 16:51

For everybody who came across this, I had to learn it the hard way...

If you have ever used 'sed' in order to modify the selinux file in /etc/sysconfig/selinux - this will destroy the symlink to the original /etc/selinux/config file


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .