Seeting SELinux on the terminal without rebooting the server and and getting the SELinux values

SELinux is a layer of Security but it’s not the all-in-one security solution

SamJain
1 min readAug 29, 2021
  • SELinux policy rules define how processes interact with files, as well as how processes interact with each other. Access is only allowed if an SELinux policy rule exists that specifically allows it.
  • It enforces data confidentiality and integrity, as well as protecting processes from untrusted inputs and gives a fine-grained access control.
  • But.., SELinux can only enhance existing security solutions, not replace them. Even when running SELinux, it is important to continue to follow good security practices, such as keeping software up-to-date, password complexity, and firewalls.

Use the setenforce utility to change between enforcing and permissive mode

Changes made with setenforce do not persist across reboots. To change to enforcing mode, enter the setenforce 1 command as the Linux root user. To change to permissive mode, enter the setenforce 0 command. Use the getenforce utility to view the current SELinux mode as below.

# getenforce
Enforcing
# setenforce 0# getenforce
Permissive
# setenforce 1# getenforce
Enforcing

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

SamJain
SamJain

Written by SamJain

Hi, I am Sampada Jain, a system and Cloud Technologies enthusiast. I find learning technologies easy and love to trouble-shoot errors. Passionate Linux learner.

No responses yet

Write a response