#1110827 kgb-bot: avoid changing file permissions and ownership on each service startup

#1110827#5
Date:
2025-08-11 09:16:10 UTC
From:
To:
Hi,

kgb-bot modifies the permissions + ownership of /var/log/kgb-bot.log
on each and every single service startup.

This is caused by /usr/lib/systemd/system/kgb-bot.service with:

  ExecStartPre=/usr/bin/touch /var/log/kgb-bot.log
  ExecStartPre=/bin/chown Debian-kgb:root /var/log/kgb-bot.log
  ExecStartPre=/bin/chmod 0644 /var/log/kgb-bot.log

This causes possibly unneeded executions, but also overrides any
local permissions and ownership changes possibly done by the local
user.

If at all, such a change should be implemented in maintainer scripts
(if relevant for upgrades), or (otherwise and preferably) in a
declarative way via systemd's tmpfiles.d(5). (Especially as
/etc/init.d/kgb-bot already provides the implementation for the
non-systemd systems anyway. :))

regards
-mika-