π ~1 min read
Table of contents
Symptom & Impact
Service fails at startup because required file or capability access is denied.
Environment & Reproduction
Seen after app upgrades that introduce new paths not covered by existing profile.
sudo systemctl status --no-pager
Root Cause Analysis
AppArmor profile lacks rules for new binary behavior or file locations.
Quick Triage
Find AppArmor DENIED events for target process.
sudo journalctl -k -g DENIED -n 80 --no-pager
Step-by-Step Diagnosis
Correlate denied paths with active profile mode and service unit.
sudo aa-status
sudo journalctl -k -g apparmor -n 120 --no-pager

Solution – Primary Fix
Update profile rules and reload AppArmor for the service.
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 set profile to complain mode while collecting exact access needs.
sudo aa-complain /etc/apparmor.d/
Verification & Acceptance Criteria
Service starts successfully and deny events stop for required paths.
systemctl is-active
sudo journalctl -k -g DENIED -n 20 --no-pager
Rollback Plan
Restore previous profile file and reload parser if behavior regresses.
sudo cp /etc/apparmor.d/.bak /etc/apparmor.d/
sudo apparmor_parser -r /etc/apparmor.d/
Prevention & Hardening
Review profile updates alongside application release changes.
sudo aa-status
Related Errors & Cross-Refs
Related to audit apparmor DENIED and permission denied startup failures.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu AppArmor profile authoring and troubleshooting docs.
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.