Pcornel
Linux · AppArmor

AppArmor Troubleshooting

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

Back to the Topic

Answer

AppArmor troubleshooting finds the DENIED message, identifies profile, operation and path, and adds the smallest rule or fixes the program's paths.

Remember

Look for apparmor="DENIED" with profile, operation and name. Custom data directories often need a local rule. Do not disable the profile globally.

First checks

  • aa-status — loaded profiles and modes
  • journalctl -k | grep -i apparmor — denials
  • aa-complain / aa-enforce <profile> — change a profile's mode
  • apparmor_parser -r <profile> — reload a profile

Commands

journalctl -u apparmor

Verify in this order

failure → DENIED message → rule added locally → profile reloaded → works in enforce

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=2865

Confirmation

Confirm action

Continue?