October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

What Is Security-Enhanced Linux (SELinux)? Definition and Basics

SELinux is Linux mandatory access control: it uses security contexts and policy rules to restrict how processes interact with system resources.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) system for Linux. It uses labels called security contexts and policy rules to control how processes interact with files and other system resources, adding restrictions beyond ordinary user, group, and other permissions.

What SELinux does

SELinux answers a question ordinary file permissions may not fully address: may this process perform this action on this resource? For example, policy can determine whether a web server process may read files in users’ home directories. Red Hat’s RHEL 10 SELinux guide describes SELinux as applying policy rules to decide which interactions are allowed; interactions without an applicable allow rule are denied.

As an Amazon Associate I earn from qualifying purchases.

SELinux can limit what an application is able to do if it is compromised, such as restricting access to files or network resources. It does not prevent every compromise, and its protection depends on the active policy and system configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How contexts and policy work

A security context is a label attached to a process or resource. SELinux policy uses those labels to decide which operations are permitted. This gives administrators a way to restrict interactions based on the role and type of the process and resource, rather than relying only on file ownership and permission bits.

For example, an older Red Hat Enterprise Linux 6 targeted-policy guide uses the file type httpd_sys_content_t in an example of content that the httpd process is permitted to access under that policy. That label is illustrative, not a universal current default. The same historical guide notes that changes made with chcon do not survive filesystem relabeling. See Red Hat’s RHEL 6 targeted-policy documentation for the example.

SELinux compared with ordinary Linux permissions

Traditional discretionary access control (DAC) uses ownership and user, group, and other permission bits to govern access. SELinux implements mandatory access control (MAC) through policy rules based on contexts. In the RHEL 10 guide, SELinux checks follow DAC checks: passing ordinary permissions does not by itself guarantee access if SELinux policy denies the operation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

SELinux operating modes

Red Hat’s RHEL 8 documentation describes three modes. Their meanings below reflect that release’s guide; consult documentation for the Linux distribution and release you administer before changing a system’s configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Mode What happens
Enforcing The loaded policy is applied, and operations it denies are blocked.
Permissive Resources continue to be labeled and would-be policy denials are logged, but those operations are not blocked.
Disabled SELinux policy is not enforced.

For these mode descriptions, see Red Hat’s RHEL 8 guide to SELinux states and modes. The exact administration steps and implications of changing modes should be checked against the target release’s documentation.

What to keep in mind

  • SELinux supplements ordinary permissions; it does not replace them.
  • Labels, policy rules, defaults, and administration procedures vary across distributions and releases. The targeted-policy default described in Red Hat’s RHEL 6 guide should not be assumed for every current Linux system.
  • A denial may reflect an intentional policy restriction, so identify the relevant process, resource label, and policy before changing configuration.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.