From: Simon Ruderich Date: Thu, 20 Dec 2012 20:42:24 +0000 (+0100) Subject: zsh/rc: Don't change umask as root. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=b8b992b2aba6d6e9eed0f0b2e025c08511139290;p=config%2Fdotfiles.git zsh/rc: Don't change umask as root. --- diff --git a/zsh/rc b/zsh/rc index a789428..bb11dd7 100644 --- 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