DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

umask(1)


umask -- set file-creation mode mask

Synopsis

/u95/u95/bin/umask [-S] [mask]

Description

This shell script executes the builtin command of the same name as implemented by the /u95/bin/sh shell. See ksh(1) for more information on this shell.

The user file-creation mode mask is set to mask. This mask affects the initial value of the file permission bits of subsequently created files (see creat(2)).

The mask can be either symbolic form, or octal form. See chmod(1) for a description of the syntax for mask. If mask is in symbolic form, then the umask is set to the logical complement of the result of the symbolic definition. (That is, the symbolic form should specify the permissions to allow through, not the permissions to mask out.) If the mask is in octal form, then each set bit will mask the matching permission (the complement of the symbolic form).

If mask is omitted, the current value of the mask is printed in either symbolic or octal form (see the -S option).

umask is recognized and executed by the shell.

umask can be included in the user's .profile (see profile(4)) and invoked at login to automatically set the user's permissions on files or directories created.

Options


-S
Mask is in symbolic form. If this option is not specified, the mask is printed in octal form. The output for symbolic form is the same as the output from printf(1) given this input:
   "u=%s,g=%s,o=%s\n" owner_perms group_perms other_perms

Each permissions string has the same meaning as permissions in the arguments to chmod(1).

Examples

For example, umask 022 and umask a=rx,u+w, both remove ``group'' and ``others'' write permission (files normally created with mode 777 become mode 755; files created with mode 666 become mode 644).

Files


/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
language-specific message file (See LANG on environ(5).)

References

chmod(1), chmod(2), creat(2), profile(4), ksh(1), umask(2)

Notices

The octal form of umask is only provided for backward compatibility, and may not be supported in future releases. It should therefore be avoided.


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005