$linuxjunkies
>

capability-based security

also: capabilities, POSIX capabilities

A security model that grants processes fine-grained permissions (capabilities) instead of giving them all privileges of their owner, reducing the damage potential if a process is compromised.

Capability-based security divides traditional Unix root privileges into smaller, specific permissions called capabilities. Instead of a process either having full root access or limited user access, it can be granted only the exact permissions it needs—like the ability to bind to network ports or change the system time.

In Linux, capabilities are enforced at the kernel level using the libcap library. For example, the ping command traditionally needed to run as root to send ICMP packets, but with capabilities it can run as a regular user with only the CAP_NET_RAW capability. This limits harm if ping is exploited—the attacker gains only that specific power, not full root access.

Common capabilities include CAP_NET_BIND_SERVICE (bind to ports below 1024), CAP_SYS_ADMIN (perform admin operations), and CAP_DAC_OVERRIDE (bypass file permissions). You can view and set capabilities on executables using tools like getcap and setcap.

Related terms