Disable selinux in Centos Linux

There a couple ways to disable selinux from enforcing file contexts. The first and preferred way is to

vi /etc/sysconfig/selinux

And change “enforcing” to “permissive”. Once this is done selinux will be in permissive mode and not enforce on the next reboot. If you cannot reboot the system, you will need to disable it from running using the following, and second, method

echo 0 > /selinux/enforce

This will prevent the kernel from enforcing any file context policy.

Be the first to comment

Leave a Reply