AppArmor is a Mandatory Access Control (MAC) system built on the Linux Security Module (LSM) framework. It confines individual programs to the resources described in a per-application profile, so a bug — or a zero-day — in one application cannot be used to reach parts of the system that profile never granted. Unusually among the major LSMs, AppArmor policy is written against file paths and glob patterns rather than inode labels, which keeps a profile readable to an administrator who has never studied a policy language.
Enforcement happens in the kernel, so a confined process cannot switch it off or widen its own permissions: the restrictions are mandatory and are not bound to identity, group membership or file ownership, which means they also restrain programs running as root. AppArmor has been in the mainline Linux kernel since 2.6.36 and its userspace development has been supported by Canonical since 2009; it is the default major LSM on Ubuntu and on openSUSE/SUSE, and it ships with Debian, Alpine and other distributions. The kernel side plus the userspace tools in the apparmor/apparmor repository are licensed GPL-2.0, with libapparmor under the LGPL so that non-GPL binaries may still call change_hat(2) and change_profile(2).
/etc/nginx/** r, /var/log/nginx/*.log w) with separate read, write, memory-map, link and lock permissions, plus execute modes (ix, ux, px, cx) that decide whether a spawned program inherits the profile, runs unconfined, or transitions to a profile of its own.aa-complain puts a profile into learning mode where denied operations are logged but allowed, so a new profile can be tuned on a production host without breaking it. aa-enforce, aa-audit, aa-disable and aa-teardown move profiles between modes from the command line; the aa-status summary reports how many profiles are loaded and how many are enforcing, complaining or unconfined.aa-genprof and aa-logprof read the denial records the kernel emits, present them interactively and write the resulting rules back into the profile, which turns policy authoring into a guided workflow instead of guesswork.ptrace, signals and other inter-process communication, so a profile describes everything a program may do, not just what it may open.abstractions/base and abstractions/nameservice avoid repeating common library, locale and DNS access rules in every profile. A normal desktop/server installation accumulates well over a hundred entries under /etc/apparmor.d from the distribution plus third-party packages (browsers, container tools, editors).change_profile and change_hat let a program drop into a narrower confinement context per request (used by mod_apparmor for Apache and pam_apparmor for PAM sessions), and AppArmor supports stacking policies on top of one another as well as being combined with other LSMs.apparmor="DENIED" record to the kernel log, syslog, journald or auditd, naming the profile, the attempted operation, the object and the process, which makes both troubleshooting and compliance reporting straightforward.apparmor_parser, aa-unconfined (lists processes running without confinement), aa-notify, aa-decode, aa-features-abi and an apparmor.vim syntax file./etc/shadow or write outside the document root.#included local overrides) through Ansible, Puppet or a cloud-init script so every host in a fleet carries the same confinement, versioned beside the rest of the configuration.Linux only — AppArmor is a kernel LSM, with the kernel portion mainlined since 2.6.36 and the userspace maintained separately. The current userspace works with any kernel from 2.6.15 onwards (older kernels need the project’s compatibility patches) and is packaged by Debian/Ubuntu (apparmor, 4.1.0 in Debian 13), openSUSE/SUSE, Alpine and other distributions, with builds for amd64, arm64, armhf/armel, i386, ppc64el, s390x and riscv64. It builds from source as several components — libapparmor, binutils, the parser, the initscripts, the Python utilities and the reference profiles/ tree — and ships language bindings for C, Perl, Python and Ruby.
Free and open source. The kernel module and the userspace tools are released under the GNU General Public License v2.0 — the repository’s LICENSE file states that the GPL applies to the whole source tree unless a subdirectory says otherwise. libapparmor is an explicit exception, licensed LGPL so that non-GPL binaries can still use the confinement APIs. Source, releases and the issue tracker are at gitlab.com/apparmor/apparmor, and the official documentation (concepts, profile syntax, abstractions, man pages) is at apparmor.net. Recent releases are 5.0.2 (July 2026) on the current feature line and 4.1.8 (August 2026) on the maintenance line, with 6.0.0 in alpha.