16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Related Information<br />

setrlimit in z/<strong>OS</strong> XL C/C++ Run-Time Library Reference.<br />

umask — Set or return the file mode creation mask<br />

Format<br />

Description<br />

Options<br />

Localization<br />

umask [–S] [mode]<br />

tcsh shell: umask [value]<br />

umask sets the file-creation permission-code mask of the invoking process to the<br />

given mode. You can specify the mode in any of the formats recognized by chmod;<br />

see chmod for more information.<br />

The mode may be specified in symbolic (rwx) or octal format. The symbolic form<br />

specifies what permissions are allowed. The octal form specifies what permissions<br />

are disallowed.<br />

The file-creation permission-code mask (often called the umask) modifies the<br />

default (initial) permissions for any file created by the process. The umask specifies<br />

the permissions which are not to be allowed.<br />

If the bit is turned off in the umask, a process can set it on when it creates a file. If<br />

you specify:<br />

umask a=rx<br />

you have allowed files to be created with read and execute access for all users. If<br />

you were to look at the mask, it would be 0222. The write bit is set, because write<br />

is not allowed. If you want to permit created files to have read, write, and execute<br />

access, then set umask to 0000. If you call umask without a mode argument,<br />

umask displays the current umask.<br />

umask in the tcsh shell<br />

In the tcsh shell, umask sets the file creation mask to value, which is given in octal.<br />

Common values for the mask are 002, giving all access to the group and read and<br />

execute access to others, and 022, giving read and execute access to the group<br />

and others. Without value, umask prints the current file creation mask. See “tcsh —<br />

Invoke a C shell” on page 626.<br />

–S Displays the umask in a symbolic form:<br />

u=perms,g=perms,o=perms<br />

giving owner, group and other permissions. Permissions are specified as<br />

combinations of the letters r (read), w (write), and x (execute).<br />

umask uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

ulimit<br />

Chapter 2. Shell command descriptions 721

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!