π ~1 min read
Table of contents
Symptom & Impact
Application starts but cannot access files, sockets, or capabilities, leading to partial failures. Logs show permission errors despite correct Unix ownership.
Environment & Reproduction
Frequent on Ubuntu 16.04 with enforced AppArmor profiles after package upgrades or path changes. Reproduce by moving data directory outside profile rules.
Root Cause Analysis
Mandatory access control blocks operations not explicitly permitted by active AppArmor profiles. The process context differs from expected policy paths.
Quick Triage
Check denials via dmesg | grep DENIED and journalctl -k. Identify profile state with aa-status and affected executable path.
Step-by-Step Diagnosis
Collect denial logs, map requested operations to profile rules, and use aa-logprof in review mode to draft safe policy additions.

Solution – Primary Fix
Update the relevant profile in /etc/apparmor.d with least-privilege allowances, then reload using apparmor_parser -r or systemctl reload apparmor.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Set profile to complain mode temporarily for debugging, or relocate application paths back into existing allowed directories.
Verification & Acceptance Criteria
App behavior is restored and new AppArmor denials no longer appear for expected operations under production load.
Rollback Plan
Revert profile edits from version control and reload AppArmor. If needed, return to prior package profile versions.
Prevention & Hardening
Version-control local profile overrides and validate with staging traffic before production rollout. Keep AppArmor policies aligned with filesystem layout standards.
Related Errors & Cross-Refs
Commonly mistaken for file permission or SELinux issues; also appears with systemd sandboxing restrictions.
Related tutorial: View the step-by-step tutorial for Ubuntu 16.04 LTS.
View all Ubuntu 16.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
AppArmor documentation, aa-status(8), aa-logprof(8), and Ubuntu security hardening references.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.