Profiles
Cheat sheet · https://pcornel.dk/topic.php?topic=2862
Answer
AppArmor profiles in /etc/apparmor.d/ list what a program may do: file paths with permissions (r, w, x variants), capabilities, network access, signals and mounts, often using abstractions.
Remember
Keep local changes in /etc/apparmor.d/local/ so updates do not overwrite them. Reload after editing. aa-logprof proposes rules from logged denials.
First checks
aa-status— loaded profiles and modesjournalctl -k | grep -i apparmor— denialsaa-complain / aa-enforce <profile>— change a profile's modeapparmor_parser -r <profile>— reload a profile
Verify in this order
profile loaded → attached to the program path → rules checked on each access
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=2862