Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Linux Capabilities · Linux Security

Direct answer

Linux Capabilities split traditional root privilege into per-thread privilege bits with permitted, effective, inheritable, bounding and ambient sets, plus file capabilities and namespace context.

When to use this

Use it when configuring, checking or troubleshooting Linux Capabilities in Linux Security.

First 30 seconds

1. Capabilities split root privileges (CAP_NET_BIND_SERVICE, CAP_SYS_ADMIN…).

2. Grant only needed caps instead of root.

3. CAP_SYS_ADMIN is nearly root.

4. Audit file caps.

5. Containers drop most caps.

Operational verification

process → capability set → privileged operation allowed

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A capability grants authority for defined kernel checks; it does not constrain all downstream effects or replace DAC/LSM/process isolation.

Suspicious evidence: CAP_SYS_ADMIN overuse, ambient leak, file capability on writable binary, bounding set broad, container namespace misunderstood, capability retained after drop or no audit.

Platform / version applicability
Platform and workload security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPlatform and workload security
Scope / prerequisiteUse it when configuring, checking or troubleshooting Linux Capabilities in Linux Security.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

executable/file caps and process credentials → permitted/inheritable/bounding sets → exec transition → effective/ambient capability → privileged kernel operation → LSM/audit outcome

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Non-root process ≠ unprivileged process when capabilities are effective.
  • One narrow capability ≠ low risk; some capabilities enable broad privilege or escape paths.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
Key checks
  • getcap -r / 2>/dev/null — file capabilities
  • capsh --print — current process caps
  • grep Cap /proc/<pid>/status — process capabilities
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A capability grants authority for defined kernel checks; it does not constrain all downstream effects or replace DAC/LSM/process isolation.

In depth

Linux capabilities split root's privileges into distinct units — CAP_NET_BIND_SERVICE (bind ports below 1024), CAP_NET_ADMIN (network configuration), CAP_SYS_ADMIN (very broad) and around 40 others. Granting only needed capabilities lets programs avoid running as full root.

getcap -r /usr/bin 2>/dev/null
setcap 'cap_net_bind_service=+ep' /opt/app/server
capsh --print
# systemd service
[Service]
User=app
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE

Treat CAP_SYS_ADMIN, CAP_SYS_PTRACE and CAP_DAC_OVERRIDE as nearly equivalent to root. Audit files with capabilities like setuid binaries.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Commands

getcap -r / 2>/dev/null            # files with capabilities
setcap cap_net_bind_service=+ep /usr/local/bin/app   # bind <1024 without root
capsh --print                      # current capabilities
grep Cap /proc/<pid>/status ; capsh --decode=<hex>

Documented example, not captured output. CAP_SYS_ADMIN is almost equal to root. In systemd units use CapabilityBoundingSet= and AmbientCapabilities=; in containers drop all and add only what is needed.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPlatform and workload security current

Authoritative/upstream documentation reviewed for bounded claims in Linux Security → Linux Capabilities. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/security/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
POSIX capabilitiesLinux privilege capabilitiescapability sets
Embedded reference data

Quick lookup tables

Linux Security → Linux Capabilities proof map

Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → Linux Capabilities.

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure
Confirmation

Confirm action

Continue?