Bug 25284: chown /var/log/koha log files on koha-create
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 May 2020 12:26:56 +0000 (14:26 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 20 May 2020 08:15:45 +0000 (09:15 +0100)
To prevent Apache to create intranet-error.log and opac-error.log with
root permission we chown them after it has been restarted (and so
created them) when a new Koha instance is created

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

debian/scripts/koha-create

index 45c1ef6..b90e7d4 100755 (executable)
@@ -757,6 +757,8 @@ then
         # Get letsencrypt certificates
         letsencrypt_instance
     fi
+
+    chown $username:$username /var/log/koha/$name/*.log
 fi