Pcornel
Linux · SELinux

Permissive

Cheat sheet · https://pcornel.dk/topic.php?topic=2856

Back to the Topic

Answer

Permissive mode loads the SELinux policy and logs AVC denials but does not block them. It is used briefly to diagnose, not for production.

Remember

setenforce 0 switches until reboot. If the problem disappears in permissive, collect the denials and fix them, then setenforce 1. Leaving systems permissive removes the protection.

First checks

  • getenforce / sestatus — mode and policy
  • ls -Z <path> — file context
  • ps -eZ | grep <proc> — process context
  • ausearch -m AVC -ts recent — recent denials
  • semanage fcontext -l | grep <path> — context rules for a path

Verify in this order

permissive → access allowed but denial logged → denials used to fix policy → back to 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=2856

Confirmation

Confirm action

Continue?