umaskget or set the file mode creation mask |
KornShell Built-in |
umask
[-S
] [mode]
umask
sets the file mode creation mask of the invoking
process to the given mode. You can specify the mode in any of the
formats recognized by chmod;
see chmod for more information.
The file mode creation mask (often called the umask)
determines the default permissions for any file created by the process.
For example, a file created by the create
command has
the permissions specified by the umask
unless the create
command specifies explicit permissions.
Calling umask
without a mode argument
displays the current umask.
-S
displays the umask in a symbolic form:
giving user, group and other permissions. Permissions are specified as combinations of the lettersu=perms,g=perms,o=perms
r
(read), w
(write)
and x
(execute).0
Successful completion.
1
Failure due to an invalid command line argument, or invalid mode.
chmod