umask(1) umask(1)
NAME
umask - set file-creation mode mask
SYNOPSIS
umask [setting]
DESCRIPTION
The user file-creation mode mask is set to setting, where
setting is a 3-digit octal number. The three octal digits
refer to read/write/execute permissions for owner, group,
and others, respectively (see chmod(2) and umask(2)). The
value of each specified digit is subtracted from the
corresponding ``digit'' specified by the system for the
creation of a file (see creat(2)). 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 setting is omitted, the current value of the mask is
printed.
umask is recognized and executed by the shell.
EXAMPLE
umask 22
sets file-creation mode mask such that at file creation, the
write bits will be zeroed out for group and other users,
regardless of mode specification in creat(2).
SEE ALSO
chmod(1), csh(1), ksh(1), sh(1), chmod(2), creat(2),
umask(2).
Page 1 (last mod. 1/16/87)