up | Inhaltsverzeichniss | Kommentar

Manual page for UMASK(2)

umask - set file creation mode mask

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>

mode_t umask(mode_t cmask);

DESCRIPTION

The umask sets file mode creation mask of the calling process to cmask and returns the previous value of the mask. The low-order nine bits of cmask are used whenever a file is created, clearing corresponding bits in the file mode (see chmod.2 This clearing allows a user to restrict the default access to his/her files.

The value is initially 022 (write access for owner only). The mask is inherited by child processes.

The BSD declaratation of umask accepts and returns type int, not mode_t.

RETURN VALUE

The previous value of the file mode creation mask is returned by the call.

ERRORS

The umask function is always successful--no return value indicates an error.

SEE ALSO

chmod(2), creat(2), mkdir(2), mkfifo(2P),


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97