π ~1 min read
Table of contents
Symptom & Impact
Service launches fail or features break due to mandatory access control denials.
Environment & Reproduction
Often follows package upgrade, path changes, or custom app deployment.
aa-status
systemctl status
journalctl -k -n 100 --no-pager | grep apparmor
Root Cause Analysis
Profile rules do not permit required file, network, or capability access for the updated binary behavior.
Quick Triage
Locate exact denied action and associated profile.
sudo dmesg | grep -i 'apparmor="DENIED"' | tail -n 40
sudo journalctl -k | grep -i apparmor | tail -n 80
Step-by-Step Diagnosis
Map denied paths and generate candidate policy updates.
sudo aa-logprof -f /var/log/syslog
sudo grep -RIn '' /etc/apparmor.d

Solution – Primary Fix
Adjust AppArmor profile minimally and reload policy.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.
sudoedit /etc/apparmor.d/
sudo apparmor_parser -r /etc/apparmor.d/
sudo systemctl restart

Solution – Alternative Approaches
Temporarily switch profile to complain mode during controlled diagnostics.
sudo aa-complain /etc/apparmor.d/
sudo systemctl restart
sudo aa-enforce /etc/apparmor.d/
Verification & Acceptance Criteria
Service operates normally and no new AppArmor denies are logged.
systemctl is-active
sudo journalctl -k -n 100 --no-pager | grep -i apparmor
aa-status
Rollback Plan
Restore previous profile file and reload if new rules create side effects.
sudo cp /etc/apparmor.d/.bak /etc/apparmor.d/
sudo apparmor_parser -r /etc/apparmor.d/
Prevention & Hardening
Review profile changes during deployments and include denial monitoring in alerting.
aa-status
sudo grep -RIn 'DENIED' /var/log/syslog /var/log/kern.log 2>/dev/null | tail -n 50
Related Errors & Cross-Refs
Often overlaps with permission errors, missing directories, and service sandbox restrictions.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu AppArmor policy authoring and troubleshooting documentation.
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.