lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2c95d17 2/5: Set umask more delicately


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2c95d17 2/5: Set umask more delicately
Date: Sat, 9 May 2020 15:23:13 -0400 (EDT)

branch: master
commit 2c95d17e238064b8a23f69016c3821bd096a232c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Set umask more delicately
    
    Instead of forcing umask 022, change only the group bits. This:
      umask g=u
    would be nicer, but umask doesn't allow such a mode specification.
    If umask was 077, it becomes 007; rationale here:
      https://lists.nongnu.org/archive/html/lmi/2020-05/msg00002.html
---
 gwc/.zshrc        | 5 +----
 install_centos.sh | 6 +-----
 install_redhat.sh | 6 +-----
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/gwc/.zshrc b/gwc/.zshrc
index e5a8a5f..5dcfbad 100644
--- a/gwc/.zshrc
+++ b/gwc/.zshrc
@@ -15,10 +15,7 @@ export PATH="$MINIMAL_PATH"
 # and replace :0.0 below with the string it returns:
 export DISPLAY=":0.0"
 
-if [ "$(umask)" -ne 022 ]; then
-  printf "Overriding bogus umask %s\n" "$(umask)"
-  umask 022
-fi
+umask g=rwx
 
 # Make the X clipboard available to root, for vim only. See:
 #   https://lists.nongnu.org/archive/html/lmi/2019-10/msg00000.html
diff --git a/install_centos.sh b/install_centos.sh
index ee4c928..fd140dd 100755
--- a/install_centos.sh
+++ b/install_centos.sh
@@ -26,11 +26,7 @@ set -evx
 stamp0=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
 echo "Started: $stamp0"
 
-# Override any too-restrictive default (e.g., 077).
-if [ "$(umask)" -ne 022 ]; then
-  printf "Overriding bogus umask %s\n" "$(umask)"
-  umask 022
-fi
+umask g=rwx
 
 # A known corporate firewall blocks gnu.org even on a GNU/Linux
 # server, yet allows github.com:
diff --git a/install_redhat.sh b/install_redhat.sh
index 7b7938b..1ce4e6d 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -26,11 +26,7 @@ set -evx
 stamp0=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
 echo "Started: $stamp0"
 
-# Override any too-restrictive corporate default (e.g., 077).
-if [ "$(umask)" -ne 022 ]; then
-  printf "Overriding bogus umask %s\n" "$(umask)"
-  umask 022
-fi
+umask g=rwx
 
 # A known corporate firewall blocks gnu.org even on a GNU/Linux
 # server, yet allows github.com:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]