Copyright (c) 1980 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)umask.2 4.1 (Berkeley) 05/09/85
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)umask.2 4.1 (Berkeley) 05/09/85
UMASK 2
C 4 NAME
umask - set file creation mode mask
SYNOPSIS
umask(complmode) DESCRIPTION
Umask sets a mask used whenever a file is created by
creat (2) or
mknod (2): the actual mode (see
chmod (2)) of the newly-created file is the logical
and of the given mode and the complement of the argument.
Only the low-order 9 bits of the mask (the protection bits)
participate.
In other words, the mask shows the bits to be turned off
when files are created.
The previous value of the mask is returned by the call. The value is initially 022 (write access for owner only). The mask is inherited by child processes.
SEE ALSO
creat(2), mknod(2), chmod(2)
"ASSEMBLER (PDP-11)"
(umask = 60.)
sys umask; complmode