From 300c999a5a6cf3c819c23ee92ec3a6161cfbcebe Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 20 Nov 2023 19:01:33 +0100 Subject: [PATCH] logrotate: fix generated config file perms (#1736) * fix generated logrotate config file perms * apply perms to the right file (I'm so tired lmao) * fix indent * update docs * revert: wrong branch :sob: --------- Co-authored-by: OniriCorpe --- helpers/logrotate | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/logrotate b/helpers/logrotate index 45f66d443..de9f8d3c1 100644 --- a/helpers/logrotate +++ b/helpers/logrotate @@ -99,6 +99,7 @@ $logfile { EOF mkdir --parents $(dirname "$logfile") # Create the log directory, if not exist cat ${app}-logrotate | $customtee /etc/logrotate.d/$app >/dev/null # Append this config to the existing config file, or replace the whole config file (depending on $customtee) + chmod 644 "/etc/logrotate.d/$app" # Make sure permissions are correct (otherwise the config file could be ignored and the corresponding logs never rotated) } # Remove the app's logrotate config.