UMASK(C) XENIX System V UMASK(C)
Name
umask - Sets file-creation mode mask.
Syntax
umask [ ooo ]
Description
The user file-creation mode mask is set to ooo. The three
octal digits refer to read/write/execute permissions for
owner, group, and others, respectively. Only the low-order
9 bits of cmask and the file mode creation mask are used.
The value of each specified digit is ``subtracted'' from the
corresponding ``digit'' specified by the system for the
creation of any file (see umask(S) or creat(S)). This is
actually a binary masking operation, and thus the name
``umask''. In general, binary ones remove a given
permission, and zeros have no effect at all. For example,
umask 022 removes group and others write permission (files
normally created with mode 777 become mode 755 ; files
created with mode 666 become mode 644).
If ooo is omitted, the current value of the mask is printed.
umask is recognized and executed by the shell. By default,
login shells have a umask of 022.
See Also
chmod(C), sh(C), chmod(S), creat(S), umask(S)
Page 1 (printed 2/7/91)