0

From - man capabilities

UNIX implementations distinguish two categories of processes: privileged processes (whose effective user ID is 0, referred to as superuser or root), and unprivileged processes (whose effective UID is nonzero).

and

Starting with kernel 2.2, Linux divides the privileges traditionally associated with superuser into distinct units, known as capabilities, which can be independently enabled and disabled. Capabilities are a per-thread attribute.

Does any Linux command or technique exist to determine the capabilities associated with a running process (or thread).

samshers
  • 228
  • 1
  • 4
  • a little related post - [How to find out what linux capabilities a process requires to work?](https://stackoverflow.com/questions/35469038/how-to-find-out-what-linux-capabilities-a-process-requires-to-work) – samshers Sep 17 '20 at 19:33

1 Answers1

2

The utility getpcaps will show the capabilities for a given PID.

From the man page:

SYNOPSIS

getpcaps pid...

DESCRIPTION

getpcaps displays the capabilities on the processes indicated by the pid value(s) given on the commandline. The capabilities are displayed in the cap_from_text(3) format.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940