SETCAPS(1)

NAME
setcaps - set capability restrictions on calling process

SYNOPSIS
setcaps [-lpqh] [cap[:es] ...]

DESCRIPTION
The setcaps utility sets capability restrictions on the parent process, which is typically the shell that ran this program. By default the SELF and EXEC flags are both set.

When specifying capabilities to set, a colon extension may be used to override the default restrictions.

OPTIONS
The options are as follows:

-l  List current capabilities.

-p  Print a list of all available capabilities.

-q  Do not complain if a specified capability is not available.

-h  Print help and exit.

FLAGS

:s  Sets the SELF flag. The capability restriction is applied to the calling process. However, SELF restrictions are not transfered upon exec unless the EXEC flag is also specified.

:e  Sets the EXEC flag. The capability restriction is applied to any programs exec'd by the calling process. EXEC becomes SELF when a program is exec'd. The EXEC flag remains set. Note that fork alone does not activate EXEC flagged restrictions.

:se Both flags may be specified (this is the default) for each capability listed without specified flags).

EXIT STATUS
setcaps will exit 1 on error, and 0 on success.

EXAMPLES
setcaps restricted_root setcaps restricted_root:se sensitive_root:se

SEE ALSO
syscap_set(2), syscap_get(2)

HISTORY
The setcaps utility appeared in DragonFly 6.5

AUTHORS
The setcaps utility was written by Matthew Dillon