From 0130f7be74f4f3efc2a6c243359a08fbb13dae54 Mon Sep 17 00:00:00 2001 From: Jack'lul <8418678+jacklul@users.noreply.github.com> Date: Sat, 1 Mar 2025 14:43:36 +0100 Subject: [PATCH] Fix find command syntax, remove log dir from search Signed-off-by: Jack'lul <8418678+jacklul@users.noreply.github.com> --- advanced/Templates/pihole-FTL-prestart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Templates/pihole-FTL-prestart.sh b/advanced/Templates/pihole-FTL-prestart.sh index 1abafd28..49b0f0d4 100755 --- a/advanced/Templates/pihole-FTL-prestart.sh +++ b/advanced/Templates/pihole-FTL-prestart.sh @@ -17,7 +17,7 @@ find /etc/pihole/ /var/log/pihole/ -type d -exec chmod 0755 {} + # Set all files (except TLS-related ones) to u+rw g+r find /etc/pihole/ /var/log/pihole/ -type f ! \( -name '*.pem' -o -name '*.crt' \) -exec chmod 0640 {} + # Set TLS-related files to a more restrictive u+rw *only* (they may contain private keys) -find /etc/pihole/ /var/log/pihole/ -type f -name '*.pem' -o -name '*.crt' -exec chmod 0600 {} + +find /etc/pihole/ -type f \( -name '*.pem' -o -name '*.crt' \) -exec chmod 0600 {} + # Logrotate config file need to be owned by root chown root:root /etc/pihole/logrotate