UMASK

Updated July 2015 ("Note that...")

UMASK=###

(UNIX only) Umask allows you to change A-Shell’s default file creation mask from 111 to something else. If you set UMASK=000, it will use the mask set by the shell. Otherwise it will use the specified mask. Note that the bits in the umask clear the corresponding bits in the file creation mask, which starts at 666 (rw-rw-rw-). So setting UMASK=111 will result in no change to the rw-rw-rw- mask. But UMASK=137 would result in rw-r---- (rw by the file owner, read only by members of the group, otherwise no access.)

Note that although you can't directly set the UMASK to 000, because that effectively sets it to the current default, in some environments you can work around that limitation by setting UMASK=1000.

History

2005 April, A-Shell 4.9.953:  UMASK now supports an optional second parameter to set UMASK for directory creation:

UMASK=filemask {,dirmask}

For example:

UMASK=011,002

Remember that the bits in the UMASK cause the corresponding bits in the file or directory permissions to be cleared, so 002 corresponds to drwxrwxr-x.