1SETCAP(8)                   System Manager's Manual                  SETCAP(8)
2
3
4

NAME

6       setcap - set file capabilities
7

SYNOPSIS

9       setcap [-q] [-n <rootid>] [-v] {capabilities|-|-r} filename [ ... capa‐
10       bilitiesN fileN ]
11

DESCRIPTION

13       In the absence of the -v (verify) option setcap sets  the  capabilities
14       of each specified filename to the capabilities specified.  The optional
15       -n <rootid> argument can be used to set the  file  capability  for  use
16       only  in  a  namespace with this rootid owner. The -v option is used to
17       verify that the specified capabilities are  currently  associated  with
18       the  file.  If -v and -n are supplied, the -n <rootid> argument is also
19       verified.
20
21       The   capabilities   are   specified   in   the   form   described   in
22       cap_from_text(3).
23
24       The  special capability string, '-', can be used to indicate that capa‐
25       bilities are read from the standard input. In such cases, the  capabil‐
26       ity set is terminated with a blank line.
27
28       The special capability string, '-r', is used to remove a capability set
29       from a file. Note, setting an empty capability set is not the  same  as
30       removing  it.  An empty set can be used to guarantee a file is not exe‐
31       cuted with privilege inspite of the  fact  that  the  prevailing  ambi‐
32       ent+inheritable  sets  would  otherwise bestow capabilities on executed
33       binaries.
34
35       The -q flag is used to make the program less verbose in its output.
36

EXIT CODE

38       The setcap program will exit with a 0 exit code if successful. On fail‐
39       ure, the exit code is 1.
40

SEE ALSO

42       cap_from_text(3), cap_set_file(3), getcap(8)
43
44
45
46                               11 September 2018                     SETCAP(8)
Impressum