Disable SELinux In CentOS 7

less than 1 minute read

Description:

During troubleshooting or if you are not security conscience, you may want to disable SELinux in CentOS. Note that SELinux serves a similar purpose as UAC on Windows so disabling is highly frowned upon in the community.

NOTE: I have had to do this because it was stopping me from making changes to my WordPress site and adding exceptions didn’t even seem to phase it. I’m sure it’s my lack of knowledge, so I did this a couple times. I currently have re-enabled it and having it running on all my Linux VM’s, this is just a temp solution.

To Resolve:

  1. Type:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    
    sudo vim /etc/selinux/config
    
    # Set it from:
    SELINUX=enforcing 
    
    # To 
    SELINUX=disabled
    
    # Reboot
    
    # After reboot, run 
    getenforce
    
    # Ensure it comes back with:
    disabled
    

Comments