[Debian-iot-maintainers] Bug#1110824: mosquitto: avoid changing file permissions and ownership on each service startup
Michael Prokop
mika at debian.org
Mon Aug 11 09:56:11 BST 2025
Package: mosquitto
Version: 2.0.21-1
Severity: normal
Hi,
mosquitto modifies the permissions + ownership of
/var/log/mosquitto + /run/mosquitto on each and every single service
startup.
This is caused by /usr/lib/systemd/system/mosquitto.service's:
ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
ExecStartPre=/bin/chown mosquitto:mosquitto /var/log/mosquitto
ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto
ExecStartPre=/bin/chown mosquitto:mosquitto /run/mosquitto
This overrides any local permissions and ownership changes done by
the local user.
If at all, such a change should be implemented in maintainer scripts
if relevant for upgrades, or (otherwise) in a declarative way via
systemd's tmpfiles.d(5).
regards
-mika-
More information about the Debian-iot-maintainers
mailing list