Use it when configuring, checking or troubleshooting AppArmor in Linux Security.
AppArmor
AppArmor is a path-oriented Linux Security Module that confines named applications with enforce or complain profiles covering file, capability, network, mount and execution behavior alongside ordinary Linux controls.
1. AppArmor uses path-based profiles (Ubuntu/SUSE default).
2. Enforce mode for critical services.
3. Complain mode to develop profiles.
4. Check denials in kernel log.
5. Keep profiles updated with apps.
process → profile rules → allow/deny
Context & applicabilityCommon mistakes · platform/version boundaries
An AppArmor denial shows an attached profile blocked a covered action, but it does not show malicious intent or confinement of unprofiled processes.
Suspicious evidence: profile unloaded, complain mode, renamed path, broad abstraction, unconfined child, local override drift, denial suppressed or profile disabled to fix application.
Operational reference
Fast context before you go deeper.
journalctl -k | grep apparmorVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
executed program/path → profile attachment/transition → DAC/capability checks → AppArmor rule decision → allow/log/deny → workload outcome → profile lifecycle
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- AppArmor loaded ≠ target process attached to an enforcing profile.
- Complain mode ≠ blocked enforcement; it normally permits and logs profile violations.
- Configuration file present ≠ parsed, loaded and effective runtime state.
- One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
aa-status— profiles loaded and modesjournalctl -k | grep -i apparmor— denialsaa-enforce /etc/apparmor.d/<profile>— enforce
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
An AppArmor denial shows an attached profile blocked a covered action, but it does not show malicious intent or confinement of unprofiled processes.
In depth
AppArmor confines programs with per-application profiles that list which files, capabilities and network access they may use. It is the default mandatory access control on Ubuntu, Debian and SUSE, and profiles are path-based, which many find easier than SELinux labels.
aa-status
aa-complain /etc/apparmor.d/usr.sbin.nginx # log only
aa-enforce /etc/apparmor.d/usr.sbin.nginx
aa-logprof # build profile from logged events
journalctl -k | grep -i apparmor
Use complain mode to develop profiles for custom applications, then enforce. Container runtimes apply a default AppArmor profile to containers on supporting systems — keep it enabled.
ReferenceConfiguration & state1 section · depth on demand
Commands
aa-status # loaded profiles and modes
aa-complain /etc/apparmor.d/usr.sbin.nginx
aa-enforce /etc/apparmor.d/usr.sbin.nginx
journalctl -k | grep apparmor # DENIED messages
aa-logprof # update a profile from logs
Documented example, not captured output. AppArmor is the default on Ubuntu/Debian and SUSE. Profiles are path-based, so moving a binary or data directory can bypass or break them.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Security → AppArmor. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/security/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Linux Security → AppArmor proof map
Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → AppArmor.
| Boundary | Establish | Does not establish |
|---|---|---|
| Scope | Exact host, role, build/kernel, identity, workload and expected control | Does not prove policy receipt or effective runtime state |
| Effective state | Resultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controls | Configuration presence does not prove enforcement |
| Runtime evidence | Correlated events/audit, process/token/credential, packet/syscall and workload result | One event, clean status or allow/deny does not prove complete security |
| Closure | Original allowed/denied workload works, unsafe state is removed and recovery/regression pass | Commit, restart, block or compliance result alone is not closure |