forked from flexibeast/s6-man-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
s6-setuidgid.1
56 lines (56 loc) · 1.07 KB
/
s6-setuidgid.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.Dd September 10, 2020
.Dt S6-SETUIDGID 1
.Os
.Sh NAME
.Nm s6-setuidgid
.Nd execute a program as another user
.Sh SYNOPSIS
.Nm
.Ar account
.Ar prog...
.Sh DESCRIPTION
If
.Ar account
contains a colon, it is interpreted as
.Sm off
.So
.Em uid :
.Em gid
.Sc
.Sm on ,
else it is interpreted as a username and looked up by name in the
account database.
.Pp
If
.Ar account
is unknown,
.Nm
exits 1.
.Nm
sets its (real and effective) uid and gid to those of
.Ar account .
It also sets the list of supplementary groups to the correct one for
.Ar account
according to the group database.
.Pp
Then it executes into
.Ar prog... .
.Pp
.Nm
can only be run as root.
Its main use is to drop root privileges before starting a daemon.
.Sh SEE ALSO
.Xr s6-applyuidgid 1 ,
.Xr s6-envdir 1 ,
.Xr s6-envuidgid 1 ,
.Xr s6-fghack 1 ,
.Xr s6-setsid 1 ,
.Xr s6-softlimit 1 ,
.Xr s6-tai64n 1 ,
.Xr s6-tai64nlocal 1
.Pp
This man page is ported from the authoritative documentation at:
.Lk https://skarnet.org/software/s6/s6-setuidgid.html
.Sh AUTHORS
.An Laurent Bercot
.An Alexis Ao Mt [email protected] Ac (man page port)