Disabled
Cheat sheet · https://pcornel.dk/topic.php?topic=2857
Answer
Disabled mode turns SELinux off entirely: no policy, no labels maintained. Re-enabling requires a full filesystem relabel.
Remember
Disabling is not recommended. To re-enable, set SELINUX=permissive first, touch /.autorelabel, reboot (relabel), check denials, then enforcing. On RHEL 9 disable is done with the kernel parameter selinux=0.
First checks
getenforce / sestatus— mode and policyls -Z <path>— file contextps -eZ | grep <proc>— process contextausearch -m AVC -ts recent— recent denialssemanage fcontext -l | grep <path>— context rules for a path
Verify in this order
disabled → permissive with relabel → denials fixed → enforcing
Where it usually breaks
First mismatch in identity/group resolution → Unix mode/ACL/capability → mount/sandbox constraint → SELinux/AppArmor policy → credential/TLS trust → protected operation; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2857