01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHROOT (2) CHROOT (2)<br />

NAME<br />

chroot - change root directory<br />

SYNOPSIS<br />

int chroot (path)<br />

char *path;<br />

DESCRIPTION<br />

Path points to a path name naming a directory. Chroot causes<br />

the named directory to become the root directory, the starting<br />

point for path searches for path names beginning with f.<br />

The effective user ID of the process must be super-user to change<br />

the root directory.<br />

The •• entry in the root directory is interpreted to mean the root<br />

directory itself. Thus, •• cannot be used to access files outside the<br />

subtree rooted at the root directory.<br />

Chroot will fail and the root directory will remain unchanged if<br />

one or more of the following are true:<br />

Any component of the path name is not a directory.<br />

IENOTDIR]<br />

The named directory does not exist. IENOENT]<br />

The effective user ID is not super-user. IEPERM]<br />

Path points outside the process's allocated address space.<br />

IEFAULT]<br />

RETURN VALUE<br />

Upon successful completion, a value of 0 is returned. Otherwise, a<br />

value of - 1 is returned and errno is set to indicate the error.<br />

SEE ALSO<br />

chdir(2).<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!