S6-APPLYUIDGID(8)

πŸ“¦ version 2.15.1.0, in nixpkgs unstable

✨ NAME ✨

Okay so bestie, welcome to the s6-applyuidgid(8) page from the System Manager's Manual πŸ’– β€” s6-applyuidgid β€” execute a program with reduced privileges. That's the whole vibe: it lets you run a program with less power than root, and it's lowkey iconic for that. πŸ‘‘


🌸 SYNOPSIS 🌸

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

πŸ’… DESCRIPTION πŸ’…

So here's the tea β˜•: s6-applyuidgid sets its uid, gid and supplementary group list to the values given, then executes into prog. It can only be run as root. No cap, that's the rule. πŸ‘‘

Its main use is to drop root privileges before starting a daemon β€” very "main character steps down from the throne so the daemon can live its best life" energy. 🫢

It's 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). Literally a tiny building block doing big things. 🧚


πŸŽ€ 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. So yes: commas in, spaces out. ✨
  • -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. Command line stays winning, fr fr. πŸ”₯
  • -z β€” Unexport. The UID, GID and GIDLIST variables will be removed from the process environment. Poof, gone, not invited to the afterparty. πŸ’¨

πŸ¦‹ SEE ALSO πŸ¦‹

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)

And that's the whole page, bestie πŸ’– β€” brought to you by the Debian version dated September 29, 2021, chilling under the S6-APPLYUIDGID(8) footer banner. Slay. πŸ’…πŸŽ€

πŸ“¦ where this page comes from