tophome
Featured post
Current Post

On CentOS 7, how do you disable SELinux?

SELinux (Security Enhanced Linux) is a security module for the Linux kernel that gives administrators and users additional control over access controls. It grants access in accordance with SELinux policy rules.

SELinux policy rules define how processes and users communicate with one another, as well as how they interact with files.

Access is prohibited when no SELinux policy rule explicitly allows it, such as when a process opens a file.

There are three modes in SELinux:

Enforcing: SELinux permits access based on policy rules defined by SELinux.

Permissive: In permissive mode, SELinux merely reports operations that would be forbidden in enforcing mode.

No SELinux policy is loaded, so it's disabled.

SELinux is activated and in enforcing mode by default in CentOS 7.


SELinux (Security Enhanced Linux) is a security module for the Linux kernel that gives administrators and users additional control over access controls. It grants access in accordance with SELinux policy rules.

Although it is advised that you retain SELinux in enforcing mode, you may need to switch to permissive mode or turn it off entirely in specific circumstances.

Check the SELinux Status

sestatus

DIsable

sudo setenforce 0

Follow the instructions below to permanently disable SELinux on your CentOS 7 system:

Open the /etc/selinux/config file and set the SELINUX mod to disabled:

SELINUX=disabled

SELINUXTYPE=targeted

 
×

Subscribe

Get notified by email whenever there is a new article. Free!

×

Login

You have 2 tries again

UserName
Password
 
×

Register

UserName
Email
Password
Repeat Password