Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chroot(2) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cd(1)

chdir(2)

chroot(2)

NAME

chroot − change default directory

SYNTAX

int chroot(dirname)
char *dirname;

DESCRIPTION

The chroot system call sets the root directory to dirname. This directory then becomes the starting point for path names beginning with “/”. 

RESTRICTIONS

The call is restricted to the superuser. 

RETURN VALUE

If unsuccessful, returns a −1, and the global variable errno indicates the error code. 

DIAGNOSTICS

The chroot call will fail if:

[EACCES] Search permission is denied for a component of the path name. 

[EFAULT] The specified dirname points outside the process’s allocated address space. 

[ENFILE] There is insufficient system space to contain the inode. 

[ENOENT] Either the named directory or an element within the named path does not exist. 

[ENOTDIR] A component of the path name is not a directory. 

[EPERM] The user is not the superuser. 

ASSEMBLER

(chroot = 61.) 
sys chroot; dirname

SEE ALSO

cd(1), chdir(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026