Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
umask(1) OSS Shell and Utilities Reference Manual
An s appears in the user or group execute position of a long listing (see the reference
page for the ls command) to show that the file runs with set-user-ID or set-group-ID
permission.
Note that the command umask o+s has no effect (the set-user-ID-on-execution and
set-group-ID-on-execution bits are not modified).
Absolute Mode
Absolute mode lets you use octal notation to set each bit in the permission code.
0400 Permits read by owner.
0200 Permits write by owner.
0100 Permits execute or search by owner.
0040 Permits read by group.
0020 Permits write by group.
0010 Permits execute or search by group.
0004 Permits read by others.
0002 Permits write by others.
0001 Permits execute or search by others.
EXAMPLES
1. To change the default permissions from 666 (wr-wr-wr) to 644 (rw-r--r--) using octals
(absolute mode) enter the following command.
umask 022
Notice that the octal number 022 is used. The complement of 666 is 111; when 022 is
applied to 111 the result is 133. The complement of 133 is 644, the value of the new per-
missions.
2. To change the default permissions from 666 to 644 using symbolic mode, enter the fol-
lowing command.
umask go-w
This command removes the write permissions for both the group and others.
NOTES
The umask command is a shell built-in command. It differs from the regular commands in that it
does not open a new shell process when it executes.
A general discussion of shell built-in commands and a list of the OSS shell built-in commands
are in the reference page for sh(1).
RELATED INFORMATION
Commands: chmod(1), sh(1).
9−28 Hewlett-Packard Company 527188-021