.TH CHROOT 2 .UC 4 .SH NAME chroot \- change root direvtory. .SH SYNOPSIS .nf .B #include .B int chroot(const char* path); .fi .SH DESCRIPTION .B chroot() sets the root directory for the calling process to .I path. On success, 0 is returned, otherwise a negative value is returned. The effective uid of the calling process must be root (0). .SH ERRORS .B -ENOENT is returned if a component of .I path does not exist. .PP .B -ENOTDIR is returned if .I path is not a directory. .SH FILES linux/fs/open.c /usr/include/linux/sys.h, /usr/include/unistd.h .SH SEE ALSO mount(2)