| CHROOT(8) | System Manager's Manual | CHROOT(8) |
chroot — change
root directory
chroot |
[-g
group[,group[,...]]]
[-u user]
newroot [command] |
The chroot command changes its root
directory to the supplied directory newroot and
executes command, if supplied, or an interactive copy
of the user's shell.
The chroot command is restricted to the
superuser.
The options are as follows:
-g
group[,group[,...]]-u
user-g option. Additional settings
may be applied as specified in
login.conf(5) depending on
user's login class.SHELLSHELL is
interpreted as the name of the shell to execute. If the variable
SHELL is not set, /bin/sh
is used.The chroot utility first appeared in
4.3BSD-Reno.
chroot should never be installed setuid
root, as it would then be possible to exploit the program to gain root
privileges.
| September 12, 2015 | openbsd |