Recently this turned up into quite a lot of discussion.
/etc/login.defs provides the system wide configuration
which we shouldn't ignore and override. So move our
umask settings from /etc/zsh/zshrc to /etc/skel/.zshrc
and provide it as comments (so disabled by default).
//grmlzshrc// behaves differently depending on which user loads it. For the
root user (**EUID** == 0) only a subset of features is loaded by default. This
behaviour can be altered by setting the **GRML_ALWAYS_LOAD_ALL** STARTUP
-VARIABLE (see below). Also the umask(1) for the root user is set to 022,
-while for regular users it is set to 002. So read/write permissions
-for the regular user and her group are set for new files (keep that
-in mind on systems, where regular users share a common group).
+VARIABLE (see below).
= STARTUP VARIABLES =
Some of the behaviour of //grmlzshrc// can be altered by setting certain shell
printf '-!-\n'
fi
+## Settings for umask
+#if (( EUID == 0 )); then
+# umask 002
+#else
+# umask 022
+#fi
+
## Now, we'll give a few examples of what you might want to use in your
## .zshrc.local file (just copy'n'paste and uncomment it there):
# }}}
# {{{ set some important options (as early as possible)
-# Please update these tags, if you change the umask settings below.
-#o# r_umask 002
-#o# r_umaskstr rwxrwxr-x
-#o# umask 022
-#o# umaskstr rwxr-xr-x
-if (( EUID == 0 )); then
- umask 002
-else
- umask 022
-fi
-
setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!)
is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
setopt extended_history # save each command's beginning timestamp and the duration to the history file