How do you disable selinux?

General support questions
Post Reply
damon7
Posts: 1
Joined: 2018/07/14 01:43:59

How do you disable selinux?

Post by damon7 » 2018/07/14 01:48:45

Hey guys i am having trouble disabling selinux. Any help is appreciated.

So, I tried editing the config file by using these commands:
su -
vi /etc/selinux/config
and editing SELINUX=enforcing to SELINUX=disabled.

then i reboot and when i type in sestatus it shows the following:

Code: Select all

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          error (Success)
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31

User avatar
TrevorH
Forum Moderator
Posts: 23854
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How do you disable selinux?

Post by TrevorH » 2018/07/14 09:35:14

We do not recommend disabling it at all. It's rarely necessary... actually I'd go further and say it's never necessary. Read our wiki page and learn how to use it.

Useful resources for SELinux: http://wiki.centos.org/HowTos/SELinux | http://wiki.centos.org/TipsAndTricks/SelinuxBooleans | http://docs.fedoraproject.org/en-US/Fed ... ced_Linux/ | http://www.youtube.com/watch?v=bQqX3RWn0Yw | http://opensource.com/business/13/11/se ... licy-guide | http://freecomputerbooks.com/The-SELinu ... tions.html
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

hunter86_bg
Posts: 1414
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: How do you disable selinux?

Post by hunter86_bg » 2018/07/14 15:04:35

If you need to resolve SELINUX issues just install:

Code: Select all

 yum install setroubleshoot-server
and then run

Code: Select all

 sealert -a /var/log/audit/audit.log
It will explain how confident is the plugin and viable options, but please read the wiki to learn the basics.

Post Reply