setcap

SETCAP(8)                   System Manager's Manual                  SETCAP(8)

NAME
       setcap - set file capabilities

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

DESCRIPTION
       In the absence of the -v (verify) option setcap sets  the  capabilities
       of each specified filename to the capabilities specified.  The optional
       -n <rootid> argument can be used to set the  file  capability  for  use
       only  in  a  namespace with this rootid owner. The -v option is used to
       verify that the specified capabilities are  currently  associated  with
       the  file.  If -v and -n are supplied, the -n <rootid> argument is also
       verified.

       The   capabilities   are   specified   in   the   form   described   in
       cap_from_text(3).

       The  special capability string, '-', can be used to indicate that capa-
       bilities are read from the standard input. In such cases, the  capabil-
       ity set is terminated with a blank line.

       The special capability string, '-r', is used to remove a capability set
       from a file. Note, setting an empty capability set is not the  same  as
       removing  it.  An empty set can be used to guarantee a file is not exe-
       cuted with privilege inspite of the  fact  that  the  prevailing  ambi-
       ent+inheritable  sets  would  otherwise bestow capabilities on executed
       binaries.

       The -q flag is used to make the program less verbose in its output.

EXIT CODE
       The setcap program will exit with a 0 exit code if successful. On fail-
       ure, the exit code is 1.

REPORTING BUGS
       Please report bugs via:

       https://bugzilla.kernel.org/buglist.cgi?component=lib-
       cap&list_id=1047723&product=Tools&resolution=---

SEE ALSO
       cap_from_text(3), cap_set_file(3), getcap(8)

                                  2020-01-07                         SETCAP(8)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2024 Hurricane Electric. All Rights Reserved.