From d474906010bb93828c465c1b4125d556a4b4dcd8 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 1 Aug 2026 12:48:54 -1000 Subject: Set a readable umask in the post-update hook --- custom/hooks/post-update.update-server-info | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'custom') diff --git a/custom/hooks/post-update.update-server-info b/custom/hooks/post-update.update-server-info index d499ce5..15665f9 100755 --- a/custom/hooks/post-update.update-server-info +++ b/custom/hooks/post-update.update-server-info @@ -15,4 +15,11 @@ # To install it, copy or link this file to "hooks/post-update" in each # repository and make sure it is executable. # + +set -eu + +# The pushing user's umask decides the mode of the info files this rewrites, +# so force one that leaves them readable by the web server. +umask 022 + exec git update-server-info -- cgit 2.12.1