Skip to main content

Module apparmor

Module apparmor 

Source
Expand description

AppArmor profile management actions (Ubuntu / Debian).

AppArmor is the default MAC (Mandatory Access Control) system on Ubuntu. These actions invoke aa-status (provided by the apparmor base package) and aa-enforce / aa-complain (provided by apparmor-utils, which may need a separate apt install). On a minimal server install the base package is present but apparmor-utils is not — AppArmorEnforce and AppArmorComplain will report command not found until it is added.

§Profile modes

  • enforce — the profile is active; violations are blocked and logged.
  • complain — the profile is in learning mode; violations are logged but not blocked. Use complain to diagnose an over-restrictive profile before deciding to fix or disable it.

Functions§

apparmor_complain
Put an AppArmor profile into complain (learning) mode (sudo aa-complain <profile_path>).
apparmor_enforce
Put an AppArmor profile into enforce mode (sudo aa-enforce <profile_path>).
apparmor_status
Show the status of all loaded AppArmor profiles (sudo aa-status).
specs
Return one representative ActionSpec per AppArmor action name.