CHROOT(2) COMMAND REFERENCE CHROOT(2) NAME chroot - change root directory SYNOPSIS chroot(path) char *path; DESCRIPTION The path argument is the path name of a directory; chroot causes this directory to become the root directory, the starting point for path names beginning with ``/''. This call is restricted to the superuser. DIAGNOSTICS The chroot command fails and the root directory remains unchanged if one or more of the following are true: [EPERM] The effective user ID is not the superuser. [ENOTDIR] A component of the path name is not a directory. [ENAMETOOLONG] The argument path is too long. [ENOASCII] The argument path contains a byte with the high-order bit set. [ENOENT] The named directory does not exist. [EFAULT] The path argument points outside the process's allocated address space. [ELOOP] Too many symbolic links were encountered in translating the path name. RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate an error. SEE ALSO chdir(2). Printed 4/6/89 1
%%index%% na:288,82; sy:370,345; de:715,420; di:1135,918; rv:2053,279; se:2332,115; %%index%%000000000107