From 2e852589704b0c753fa73200ebc3e8172ec239e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 7 Jul 2022 12:58:19 +0200 Subject: Reworking fix-permission dehydrated hook. Signed-off-by: Daniel Baumann --- dehydrated/share/hooks/exit_hook.fix-permissions | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dehydrated/share/hooks/exit_hook.fix-permissions b/dehydrated/share/hooks/exit_hook.fix-permissions index 6a1958d..4a467a7 100755 --- a/dehydrated/share/hooks/exit_hook.fix-permissions +++ b/dehydrated/share/hooks/exit_hook.fix-permissions @@ -26,17 +26,15 @@ then exit 0 fi -echo " + Fixing permissions..." - if getent group ssl-cert > /dev/null 2>&1 then - echo -n " + /var/lib/dehydrated/certs:" - - find /var/lib/dehydrated/certs -type d -exec chmod 0750 {} \; - find /var/lib/dehydrated/certs -type f -exec chmod 0640 {} \; + echo -n " + Fixing file owner and permissions..." # https://bugs.debian.org/854431 chown -R root:ssl-cert /var/lib/dehydrated/certs + find /var/lib/dehydrated/certs -type d -exec chmod 0750 {} \; + find /var/lib/dehydrated/certs -type f -exec chmod 0640 {} \; + echo " done." fi -- cgit v1.2.3