in reply to More permanent umask ?
I usually setup my umask value in my login rc. For KSH, that is in "$HOME/.profile". For CSH, "$HOME/.login". For Bash, "$HOME/.bash_profile". That works well because your login shell will be the parent of all the sub-processes you create, and receive a copy of that environment.
"umask 022" or "umask 0022" is the default when not specified. This equates to "chmod 644".
# umask 0022 # touch test # ls -l test -rw-r--r-- 1 root root 0 Apr 3 10:04 test
I normally set it to "umask 002", allowing members of my group to have write access to anything I create, resulting in "chmod 664".
# umask 002 # umask 0002 # touch test # ls -l test -rw-rw-r-- 1 root root 0 Apr 3 10:06 test
Verify what is currently active with "umask" and no arguments.
|
|---|