# What Is SELinux?

DevFeed: [What Is SELinux?](<https://devfeed.tech/articles/what-is-selinux-4516.md>)

Original publisher: [Read original article](<https://feeds.feedblitz.com/~/919939004/0/baeldung/linux~What-Is-SELinux>)

Author: Zachary Bouhannana

Published: 2025-06-09T04:53:08Z

Content type: article

Language: en

Sources: [Baeldung - Linux](<https://devfeed.tech/sources/baeldung-linux.md>)

Topics: [SELinux](<https://devfeed.tech/topics/selinux.md>), [Access Control](<https://devfeed.tech/topics/access-control.md>), [Security](<https://devfeed.tech/topics/security.md>), [Process](<https://devfeed.tech/topics/process.md>), [least privilege](<https://devfeed.tech/topics/least-privilege.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [administration](<https://devfeed.tech/tags/administration.md>), [administration-security-chmod-ls-selinux](<https://devfeed.tech/tags/administration-security-chmod-ls-selinux.md>), [attack-surface](<https://devfeed.tech/tags/attack-surface.md>), [chmod](<https://devfeed.tech/tags/chmod.md>), [context](<https://devfeed.tech/tags/context.md>), [linux](<https://devfeed.tech/tags/linux.md>), [ls](<https://devfeed.tech/tags/ls.md>), [security](<https://devfeed.tech/tags/security.md>), [selinux](<https://devfeed.tech/tags/selinux.md>), [what-is](<https://devfeed.tech/tags/what-is.md>), [with](<https://devfeed.tech/tags/with.md>), [works](<https://devfeed.tech/tags/works.md>)

## AI overview

SELinux adds kernel-enforced mandatory access control alongside Linux's ordinary discretionary permissions. DAC is checked first; SELinux then checks labeled users, roles, processes, and resources against policy rules, denying actions that are not explicitly allowed. This can restrict a compromised service or even root when its actions violate policy. Administrators can inspect labels with `ls -Z`, adjust supported policy behavior through booleans such as `httpd_can_network_connect`, and choose enforcing, permissive, or disabled mode. The excerpt notes that `setenforce` changes do not persist after reboot; persistent mode changes use `/etc/selinux/config`. Its example shows Apache's `httpd_t` process denied access to a file labeled `admin_home_t`, even when the command runs as root.

## Source excerpt

Learn what SELinux is, how it works, and the way it can provide better security when paired with the common discretionary access control. The post What Is SELinux? first appeared on Baeldung on Linux. Related Stories Sending a Password via SSH or SCP Using subprocess.Popen in Linux Resolving the Reverse Tunnel Remote port forwarding failed for listen port SSH Error How to Fix USB Sticks Mounted as Read-Only