On Sat, Jun 22, 2024 at 10:05:08PM +0000, Michael Gold wrote:
> While investigating why git kept complaining about the permissions of
> /etc/powerdns/pdns.conf, I found that pdns-server.postinst was resetting
> them after every upgrade:

[..]
>           chown root:pdns /etc/powerdns/pdns.conf || true
>           chmod 0640 /etc/powerdns/pdns.conf || true

> If such a line is needed at all,

It is expected that this file contains passwords.

> it should be made optional in some way.
> For example, several scripts run 'dpkg-statoverride --list' on a file,
> and avoid changing its permissions when an entry is present.

dpkg-statoverride is AFAIK not really intended for conffiles.

However, I would agree to running these lines only on install,
not on every configure.

Chris

Reply via email to