A chroot utility.
  • Go 88.6%
  • Makefile 11.4%
Find a file
2026-08-18 09:16:50 +05:00
src fix(user): filter out empty/trailing comma entries in --groups (closes #4) 2026-08-18 10:54:08 +07:00
.gitignore added .gitignore 2026-05-30 15:12:05 +03:00
go.mod Added general files 2026-05-29 17:49:33 +03:00
LICENSE Initial commit 2026-05-29 17:47:38 +03:00
main.go fix(log): rotate previous latest.log with timestamp before creating new log (closes #12) 2026-08-18 10:54:37 +07:00
Makefile Added Unit Tests 2026-05-30 15:37:42 +03:00
README.md docs: add repository mirrors note to README 2026-08-18 09:16:50 +05:00
unit_test.go Added Unit Tests 2026-05-30 15:37:42 +03:00

warproot

Note

Repository Mirrors

  • git.nuros.org (utils/warproot): primary, self-hosted Forgejo instance, accounts restricted to the core team.
  • GitHub (NurOS-Linux/warproot): mirror for external contributors. Issues and Pull Requests opened here are welcome and are reviewed and processed by the core team.

A chroot utility.

Usage

warproot [OPTIONS] NEWROOT [COMMAND [ARG]...]

If COMMAND is omitted, /bin/sh is started inside the new root.

Options

Flag Description
--userspec=USER[:GROUP] Run as the given user and optional group (name or numeric ID)
--groups=G_LIST Set supplementary groups (comma-separated names or IDs)
--skip-chdir Do not change working directory to / after chroot
--mount-proc Mount the proc filesystem at /proc inside NEWROOT
--preserve-environment Keep current environment variables instead of clearing them
--loglevel=LEVEL Log verbosity: fatal, warning, or info (default: info)
--version Print version and exit
--help, -h Print help and exit

Logging

Each run truncates and rewrites latest.log in the working directory. Verbosity is controlled with --loglevel.

Building

go build -o warproot .

Requires root privileges at runtime.

License

GPL-3.0-only