COHERENT manpages

This page displays the COHERENT manpage for chroot() [Change the root directory].

List of available manpages
Index


chroot() -- System Call (libc)

Change the root directory
#include <unistd.h>
int chroot(path)
char *path;

The  COHERENT  system  call chroot()  changes  the  current process's  root
directory  to  that  specified  by  path.  Once the  chroot()  system  call
completes, all references to absolute directories (i.e., ones starting with
`/')  will actually  refer to  directory pointed  to by  path. It  does not
change the current directory.

chroot() is  often used to  add extra security  to special or  public login
accounts.

See Also

chroot,
libc

Notes

The process  that invokes chroot()  must be running as  the superuser root,
and path must name a valid directory.