CHROOTUID(1)

πŸ“¦
version 1.3 Β· 2 versions
  • 1.3 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.3 Β· arch rolling
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ chrootuid β€” run command in restricted environment ✨

okay bestie, buckle up πŸ’– this is chrootuid, from section 1 of the General Commands Manual, and it's literally the girl who locks the door behind you and hands you a fake ID. she builds a whole tiny world for a command to live in. no cap.


🌸 SYNOPSIS 🌸

chrootuid [-i] newroot newuser command...

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: chrootuid sets up a restricted environment for executing command. that's the whole main character move.

  • Access to the file system is restricted to the newroot subtree β€” like, you do not get to peek outside, bestie, that door is closed πŸ”’
  • Privileges are restricted to those of the newuser account, which must be a known account in the unrestricted environment (iykyk β€” she has to exist in the real world first before she can move into the tiny house)
  • The initial working directory is changed to newroot

the way she does this is so smart actually β€” chrootuid combines chroot(8) and su(1) into one single program, so that there is no need to have commands such as /usr/bin/su sitting around inside the restricted environment. like, the tiny world doesn't need a whole su binary, she brought her own πŸ’… iconic behavior fr fr.

⚠️ Only the superuser can use the chrootuid command. not you. not me. root only, periodt. πŸ‘‘

πŸŽ€ OPTIONS πŸŽ€

okay so there is literally only one option and she ate:

  • -i β€” makes it run in interactive mode ✨ Errors get printed on stderr instead of through syslog, and the exit status will be 1 if there are any errors.

that's it. one option. she's minimal. she's focused. she's not doing too much. 🫢


πŸ’œ RETURN CODES πŸ’œ

two moods, bestie:

  • When running in daemon mode (the default), the exit status of chrootuid is always 0. always. no matter what. she's unbothered.
  • When running in interactive mode, it will exit with an exit status of 1 if there is any error in its invocation. otherwise, the exit status is the exit status of command β€” so the command's own result is what you get back.

🌈 DIAGNOSTICS 🌈

where do the problems go? depends on the mode, bestie:

  • daemon mode β†’ problems are reported to the syslog daemon
  • interactive mode β†’ errors are reported on stderr

same tea, different cup πŸ“


⭐ SEE ALSO ⭐

go read those too, they're the ancestors, the blueprint, the lore πŸ“š


πŸ‘‘ AUTHOR(S) πŸ‘‘

  • Wietse Venema
  • Eindhoven University of Technology
  • Department of Mathematics and Computer Science
  • Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  • IBM T.J. Watson Research
  • P.O. Box 704
  • Yorktown Heights, NY 10598, USA

🧚 CREATION DATE 🧚

Tue Oct 13 11:37:29 MET 1992

a legend was born in 1992 and she's still serving πŸ’–


πŸ¦„ LAST MODIFICATION πŸ¦„

Mon May 20 22:49:02 CEST 2007


πŸ’« VERSION/RELEASE πŸ’«

1.3


and that's the whole page, bestie πŸ’… big thank you to Wietse Venema for writing her, shoutout to the General Commands Manual for hosting, and a lil kiss to the 1.3 release β€” created back on Tue Oct 13 11:37:29 MET 1992, last touched up on Mon May 20 22:49:02 CEST 2007. slay, stay chrooted, stay safe πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from