Bobcares

How to disable selinux centos?

by | Jan 4, 2020

Wondering how to disable SELinux centos? Here’s how we do it.

SELinux provides better security for servers. Also, it provides additional access controls.

At Bobcares, we receive requests to enable or disable SELinux and fix its errors as a part of our Server Management Services.

Today, let’s see how our Support Engineers disable SELinux and troubleshoot its errors.

 

What is SELinux?

SELinux, also known as Security-Enhanced Linux. It provides security policies and an additional level of control on the Linux servers.

There are 3 different types of modes available in SELinux. They are:

1. Enforcing Mode: This is the default mode at installation in SELinux. It applies default policies on the system, log actions and deny access to some services.

2. Permissive mode: Normally, we use this mode for troubleshooting SELinux. Here, SELinux enables but does not apply any security policies. It means, it will generate a warning.

3. Disabled mode: In this mode, the SELinux is off and the security policy does not protect the server.

 

How we disable SELinux CentOS?

Till now, we discussed about SELinux. Now, let’s look at how our Support Engineers disable SELinux in centOS.

Initially, our Support Engineers check the status of SELinux. We check this to confirm if the SELinux is previously installed or not. Therefore, using the below command we check the status.

sestatus

As a result, we can confirm if the SELinux is enabled on the server or not.

Additionally, we can disable the SELinux temporarily or permanently.

 

Temporarily disable SELinux

For temporarily disabling SELinux, we run the below command.

setenforce 0

 

Permanently disable SELinux

For disabling the SELinux permanently we edit the configuration file. And the configuration file for SELinux is placed in /etc/selinux/config path. So, we simply open this configuration file. And then, we set the SELinux parameter to disabled.

For that, we open this file with the edit mode using the below command

vi /etc/selinux/config

After that, we edit the SELINUX=disabled as shown in the screenshot below

disable selinux centos

Then, we save and exit the configuration file.

We finally, reboot the server using the below command

reboot

Lastly, we verify the status of SELinux using the below command

sestatus

Now, we have successfully disabled the SELinux.

 

[Need any assistance with SELinux? – We’ll help you]

 

Conclusion

In short, SELinux provides security for server and uses policies that restrict user’s access to servers. Today, we saw our Support Engineers disable SELinux temporarily and permanently.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF