A chroot utility.
  • Go 88.4%
  • Makefile 11.6%
Find a file
2026-06-01 12:40:46 +03:00
src Update project files 2026-06-01 12:40:46 +03: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 Update project files 2026-06-01 12:40:46 +03:00
Makefile Added Unit Tests 2026-05-30 15:37:42 +03:00
README.md refactor: Split monolith into src/ 2026-05-30 09:41:33 +05:00
unit_test.go Added Unit Tests 2026-05-30 15:37:42 +03:00

warproot

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