$RodHat_/search
capabilities reference

CAP_SYS_ADMIN

The overloaded one: mounts, most namespace operations, and a long tail of admin tasks.

Bit number
21
Mask in /proc/PID/status
0000000000200000
Added in Linux
Original 2.2 set
Group
System administration

capabilities(7) itself warns that this capability is overloaded and tells kernel developers not to add to it. It covers mount and umount, creating and joining most namespaces, swapon, sethostname, and many device and filesystem operations. Check the narrower capabilities first: BPF and PERFMON (Linux 5.8) and CHECKPOINT_RESTORE (Linux 5.9) were split out of it. A container with CAP_SYS_ADMIN is not much of a container.

Narrower option: CAP_BPF, CAP_PERFMON (Linux 5.8) and CAP_CHECKPOINT_RESTORE (Linux 5.9) replace it for those jobs.

Check a running process with grep Cap /proc/PID/status, or paste the hex into the mask decoder.

Syscall cards that mention it

  • io_uring_setup(2)Linux · I/O

    Create an io_uring instance: shared submission/completion rings for async I/O.

  • seccomp(2)Linux · Sandboxing

    Set the thread's seccomp state: strict mode or a BPF filter on every syscall.

  • fanotify_init(2)Linux · Events

    Create an fanotify group: VFS-level file access events with live fds and blockable opens.

  • fsopen(2)Linux · Filesystem

    Open a filesystem context: step one of the fd-based mount API (fsconfig, fsmount, move_mount).

  • prctl(2)Linux · Processes

    Per-process/thread control knobs: no_new_privs, dumpable, parent-death signal, VMA names and more.

  • madvise(2)Linux · Memory

    Advise the kernel how a memory range will be used: free it, page it out, exclude it from dumps.

  • setns(2)Linux · Processes

    Move the calling thread into an existing namespace, given an fd for it (or a pidfd).

  • ioprio_set(2)Linux · I/O

    Set a thread's I/O scheduling class and priority (ionice is the CLI wrapper).

  • clone3(2)Linux · Processes

    Fork a child process using a struct-based API; write a pidfd atomically with CLONE_PIDFD.

  • unshare(2)Linux · Processes

    Create new namespaces and move the calling process into them without forking.

  • mount_setattr(2)Linux · Filesystem

    Change VFS-layer mount attributes on an existing mount or subtree, optionally recursing.

  • perf_event_open(2)Linux · Tracing

    Open a file descriptor for a hardware or software performance counter.

Rod on this

Sources

  1. capabilities(7), Linux man-pages
  2. user_namespaces(7), Linux man-pages

Bit numbers are from linux/capability.h. The list of syscall cards is matched by name from the card text on this site, not from the kernel source. Spot one that's wrong? Tell Rod.