Name

chroot — change root then chain

Synopsis

chroot {directory} {next-prog}

NOTE

Some operating systems come with a chroot command that does not chain, but that instead spawns its target as a child process. This command does not fork a child process, and so is suitable for use in supervised command chains run under control of a daemon supervisor.

Description

chroot is a chain-loading utility that changes its current root to directory and then chain loads to next-prog with the execvp(3) function.

next-prog may contain its own command line options, which chroot will ignore.

SECURITY

On most systems, only the superuser is permitted to execute the underlying system call.

NOTE

The functionality of the GNU chroot command can be achieved by combining this command with setuidgid(1).

Author

Jonathan de Boyne Pollard