$ man 7 capabilities
Linux capabilities reference
Root is not one privilege, it is 41 of them, and a service that needs to bind port 80 should not also be able to load kernel modules. Each capability below has its bit number, the mask it occupies in /proc/PID/status, when the kernel gained it, and a note on what it is really used for and what to reach for first.
This is the list of capabilities, not the set model. How the permitted, effective, inheritable, bounding and ambient sets interact across execve is inthe set model Tip. Numbers come from <linux/capability.h>; descriptions and versions followcapabilities(7). A newer kernel can define more than this table; /proc/sys/kernel/cap_last_capholds the highest number your running kernel knows. FreeBSD has no equivalent per-privilege bits for root: it gates privileged operations with priv(9) checks plus jails, and Capsicum capabilities are descriptor rights, a different model.
Decode a capability mask
Run grep Cap /proc/$$/status and paste any of the hex values (CapEff, CapPrm, CapBnd, CapInh, CapAmb). With capsh --decode= you get the same answer on a box that has libcap.
Paste a mask to see which capabilities are set. 0000000000000000 means none.
41 capabilities
Files and ownership
- CAP_CHOWNbit 0
Make arbitrary changes to file UIDs and GIDs.
- CAP_DAC_OVERRIDEbit 1
Bypass file read, write and execute permission checks.
- CAP_DAC_READ_SEARCHbit 2
Bypass file read permission and directory read/execute checks; call open_by_handle_at.
- CAP_FOWNERbit 3
Bypass permission checks on operations that normally need the file owner's UID.
- CAP_FSETIDbit 4
Keep set-user-ID and set-group-ID bits when a file is modified.
- CAP_LINUX_IMMUTABLEbit 9
Set the append-only and immutable inode flags.
- CAP_MKNODbit 27 · Linux 2.4
Create special files with mknod(2).
- CAP_LEASEbit 28 · Linux 2.4
Establish leases on arbitrary files.
- CAP_SETFCAPbit 31 · Linux 2.6.24
Set arbitrary capabilities on a file.
Identity and signals
- CAP_KILLbit 5
Bypass permission checks for sending signals.
- CAP_SETGIDbit 6
Make arbitrary changes to process GIDs and the supplementary group list.
- CAP_SETUIDbit 7
Make arbitrary changes to process UIDs.
- CAP_SETPCAPbit 8
Add to the inheritable set from the bounding set, drop from the bounding set, change securebits.
Network
- CAP_NET_BIND_SERVICEbit 10
Bind a socket to a privileged port (below 1024).
- CAP_NET_BROADCASTbit 11
Make socket broadcasts and listen to multicasts.
- CAP_NET_ADMINbit 12
Configure interfaces, firewall rules, routing tables and other network settings.
- CAP_NET_RAWbit 13
Use RAW and PACKET sockets; bind to any address for transparent proxying.
Memory locking and IPC
- CAP_IPC_LOCKbit 14
Lock memory with mlock, mlockall, MAP_LOCKED and SHM_LOCK; exceed RLIMIT_MEMLOCK.
- CAP_IPC_OWNERbit 15
Bypass permission checks on System V IPC objects.
Tracing, performance and checkpoint
- CAP_SYS_PTRACEbit 19
Trace arbitrary processes with ptrace; read and write other processes' memory.
- CAP_PERFMONbit 38 · Linux 5.8
Use performance-monitoring mechanisms: perf_event_open and BPF with performance implications.
- CAP_BPFbit 39 · Linux 5.8
Use privileged BPF operations.
- CAP_CHECKPOINT_RESTOREbit 40 · Linux 5.9
Update ns_last_pid, use clone3 set_tid, read map_files links of other processes.
Scheduling and resource limits
- CAP_SYS_NICEbit 23
Raise priority, set real-time policies, set CPU affinity and I/O priority for arbitrary processes.
- CAP_SYS_RESOURCEbit 24
Override resource limits and quotas.
System administration
- CAP_SYS_MODULEbit 16
Load and unload kernel modules.
- CAP_SYS_RAWIObit 17
Perform I/O port operations and other raw hardware access.
- CAP_SYS_CHROOTbit 18
Use chroot(2); change mount namespaces with setns(2).
- CAP_SYS_PACCTbit 20
Turn BSD process accounting on or off with acct(2).
- CAP_SYS_ADMINbit 21
The overloaded one: mounts, most namespace operations, and a long tail of admin tasks.
- CAP_SYS_BOOTbit 22
Use reboot(2) and kexec_load(2).
- CAP_SYS_TIMEbit 25
Set the system clock and the hardware clock.
- CAP_SYS_TTY_CONFIGbit 26
Use vhangup(2) and privileged ioctls on virtual terminals.
- CAP_SYSLOGbit 34 · Linux 2.6.37
Perform privileged syslog(2) operations and see kernel addresses when kptr_restrict is 1.
- CAP_WAKE_ALARMbit 35 · Linux 3.0
Set timers that will wake the system from suspend.
- CAP_BLOCK_SUSPENDbit 36 · Linux 3.5
Use features that can block system suspend.
Audit and mandatory access control
- CAP_AUDIT_WRITEbit 29 · Linux 2.6.11
Write records to the kernel audit log.
- CAP_AUDIT_CONTROLbit 30 · Linux 2.6.11
Enable and disable kernel auditing, change audit rules, read audit status.
- CAP_MAC_OVERRIDEbit 32 · Linux 2.6.25
Override Mandatory Access Control.
- CAP_MAC_ADMINbit 33 · Linux 2.6.25
Allow MAC configuration or state changes.
- CAP_AUDIT_READbit 37 · Linux 3.16
Read the audit log via a multicast netlink socket.
No match. Try the name without CAP_, the bit number, or a word like mount, or search the whole site.
Sources: capabilities(7), <linux/capability.h>, user_namespaces(7). Capabilities without a version are part of the original Linux 2.2 set. Spot one that's wrong? Tell Rod.