S6-APPLYUIDGID(8)

NAME
s6-applyuidgid - execute a program with reduced privileges

SYNOPSIS
s6-applyuidgid [-z] [-u uid] [-g gid] [-G gidlist] [-U] prog...

DESCRIPTION
s6-applyuidgid sets its uid, gid and supplementary group list to the values given, then executes into prog. s6-applyuidgid can only be run as root. Its main use is to drop root privileges before starting a daemon. s6-applyuidgid is a more generic version of s6-setuidgid(8). It is used as a command line building block by some programs that rewrite their command line, such as s6-tcpserver(8).

OPTIONS

-u uid
    Set the process' user ID to uid.

-g gid
    Set the process' group ID to gid.

-G gidlist
    Set the process' supplementary group list to gidlist, which must be given as a comma-separated list of numeric GIDs, without spaces.

-U  Set the process' user ID, group ID and supplementary group list to the values of the UID, GID and GIDLIST environment variables. If a -u, -g or -G option is given after -U, the command line value overrides the environment variable.

-z  Unexport. The UID, GID and GIDLIST variables will be removed from the process environment.

SEE ALSO
s6-envdir(8), s6-envuidgid(8), s6-fghack(8), s6-setsid(8), s6-setuidgid(8), s6-softlimit(8), s6-tai64n(8), s6-tai64nlocal(8), s6-tcpserver(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-applyuidgid.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)