]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
zsh/rc: Don't change umask as root.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index a789428010b66f61180807fcf272c102f8a67df4..bb11dd714444ca001058e8a02cdb05867ddc3d4a 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -45,8 +45,10 @@ resolve_fg_to_resumed_job_name() {
 
 # MISCELLANEOUS SETTINGS
 
-# Be paranoid, new files are readable/writable by me only.
-umask 077
+# Be paranoid, new files are readable/writable by me only, but not as root.
+if [[ $UID -ne 0 ]]; then
+    umask 077
+fi
 
 # Disable beeps.
 setopt nobeep