lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master fc31e85 3/3: Restore commit a7785d6a557's pre


From: Greg Chicares
Subject: [lmi-commits] [lmi] master fc31e85 3/3: Restore commit a7785d6a557's precautions
Date: Mon, 1 Nov 2021 16:32:58 -0400 (EDT)

branch: master
commit fc31e85582e4ed4eecf22afc5e93f7257389c78c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Restore commit a7785d6a557's precautions
    
    Explicitly setting ownership and permissions of the chroot's root
    directory had become unnecessary, but then corporate administrators
    redisorganized the server, reintroducing the historical problem.
---
 lmi_setup_11.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lmi_setup_11.sh b/lmi_setup_11.sh
index 58e26b6..45ea358 100755
--- a/lmi_setup_11.sh
+++ b/lmi_setup_11.sh
@@ -57,7 +57,15 @@ mkdir -p "${CACHEDIR}"
 # should not exist--debootstrapping into a nonempty directory can
 # fail in mysterious ways.
 if [ -e /srv/chroot/"${CHRTNAME}" ] ; then echo "Oops."; exit 9; fi
-mkdir -p /srv/chroot/"${CHRTNAME}"
+
+# Make the root directory of the about-to-be-created chroot, and files
+# and directories created under it, accessible to the "lmi" group--see:
+#   https://lists.nongnu.org/archive/html/lmi/2020-02/msg00007.html
+# et seqq.
+mkdir -p   /srv/chroot/"${CHRTNAME}"
+chgrp lmi  /srv/chroot/"${CHRTNAME}"
+chmod 2770 /srv/chroot/"${CHRTNAME}"
+umask 0007
 
 # Bootstrap a minimal debian system. Options:
 #   --include=zsh, because of "shell=/bin/zsh" below



reply via email to

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