SELinux mode
Whether SELinux refuses and logs disallowed accesses (enforcing), only logs them (permissive), or is off (disabled).
In more detail
setenforce switches between enforcing and permissive until the next boot. The boot mode comes from the SELINUX line of /etc/selinux/config, unless the kernel command line has enforcing=0 or selinux=0. Coming back from disabled needs a full relabel of the file system.
Examples
setenforce 1sed -i 's/^SELINUX=.*/SELINUX=enforcing/' /etc/selinux/configRelated terms
- SELinux — A Linux security layer that labels every process, file and port and allows only the accesses its policy lists.
- kernel parameter — A tunable setting of the running kernel, such as how much network buffer memory to allow.
Taught in
- The Reboot That Fails You — Red Hat Certified System Administrator (EX200) Exam Prep
- Targets, Boot And Shutdown — Red Hat Certified System Administrator (EX200) Exam Prep
- Recovering Root And Changing The Boot Loader — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Modes, And Why setenforce Is Not Enough — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Contexts: Labels, restorecon And Rules That Last — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Ports And Booleans: The Other Two Refusals — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: The Machine That Will Not Boot — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: Storage, Then SELinux, Then The Firewall — Red Hat Certified System Administrator (EX200) Exam Prep
- You Are In Emergency Mode: Boot Failures From GRUB To fstab, On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- Forbidden, With Perfect Permissions: Paths, ACL Masks And SELinux Denials — CompTIA Linux+ (XK0-006) Exam Prep
- Ninety Minutes, Five Domains: The Full Mock And The Week Before The Exam — CompTIA Linux+ (XK0-006) Exam Prep
- Conditionals: register, when, changed_when And failed_when — RHCE in Ansible (EX294): Automate Red Hat Systems
- RHEL System Roles: timesync And selinux From A Collection — RHCE in Ansible (EX294): Automate Red Hat Systems
- SELinux: Labels, Ports And Booleans That Persist — RHCE in Ansible (EX294): Automate Red Hat Systems