Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#73758 - [postfix] file ownership issues with postqueue and postdrop

Attached to Project: Arch Linux
Opened by Orm Finnendahl (orm) - Saturday, 12 February 2022, 11:57 GMT
Last edited by David Runge (dvzrv) - Tuesday, 05 April 2022, 18:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

After today's upgrade, postfix wouldn't send mails any more due to wrong ownership of /usr/bin/postdrop and postqueue (was "root:root").

/usr/bin/postdrop needs to be group "postdrop" and setgid and postqueue needs to be group "postdrop" as well.

The update/install script should take care of ensuring these properties.
This task depends upon

Closed by  David Runge (dvzrv)
Tuesday, 05 April 2022, 18:14 GMT
Reason for closing:  No response
Additional comments about closing:  There has been no response, so assuming user error.
Comment by David Runge (dvzrv) - Monday, 14 February 2022, 21:18 GMT
Hi Orm!

Are you referring to postfix 3.7.0-2?

If so, the ownership on the files are okay for me:

```
ls -lah /usr/bin/post{drop,queue}
-rwxr-sr-x 1 root postdrop 19K Feb 7 00:56 /usr/bin/postdrop
-rwxr-sr-x 1 root postdrop 23K Feb 7 00:56 /usr/bin/postqueue
```

This is ensured by tmpfiles.d (see /usr/lib/tmpfiles.d/postfix.conf).

Can you maybe provide logs for some context as to how it does not work?
Have you checked the release notes for 3.7.0 [1] whether anything might affect your configuration?

[1] http://www.postfix.org/announcements/postfix-3.7.0.html
Comment by Orm Finnendahl (orm) - Tuesday, 15 February 2022, 10:34 GMT
Hi David!

> Are you referring to postfix 3.7.0-2?

Yes.

> This is ensured by tmpfiles.d (see /usr/lib/tmpfiles.d/postfix.conf).

The entries are there and are correct, but somehow the upgrade dosn't seem to have ensured the permissions accordingly (or even changed them; I haven't changed my config in years and it worked before).

Can't see anything in the release notes which might be related except the dropping of backward compatibility to 3.3. If 3.3 didn't need the permissions that way that could be a reason, though.
Comment by David Runge (dvzrv) - Tuesday, 15 February 2022, 21:38 GMT
> The entries are there and are correct, but somehow the upgrade dosn't seem to have ensured the permissions accordingly (or even changed them; I haven't changed my config in years and it worked before).

The tmpfiles.d integration is triggered as a libalpm hook after installation.
In your /var/log/pacman.log this should look something like:

```
[2022-02-07T01:11:41+0100] [PACMAN] Running 'pacman -U postfix-3.7.0-2-x86_64.pkg.tar.zst postfix-pcre-3.7.0-2-x86_64.pkg.tar.zst'
[2022-02-07T01:11:42+0100] [ALPM] transaction started
[2022-02-07T01:11:43+0100] [ALPM] upgraded postfix (3.6.4-1 -> 3.7.0-2)
[2022-02-07T01:11:43+0100] [ALPM] installed postfix-pcre (3.7.0-2)
[2022-02-07T01:11:43+0100] [ALPM] transaction completed
[2022-02-07T01:11:43+0100] [ALPM] running '20-systemd-sysusers.hook'...
[2022-02-07T01:11:43+0100] [ALPM] running '30-systemd-daemon-reload.hook'...
[2022-02-07T01:11:43+0100] [ALPM] running '30-systemd-tmpfiles.hook'...
[2022-02-07T01:11:43+0100] [ALPM] running '30-systemd-update.hook'...
```

The tmpfiles.d setup is also ensured during boot by systemd-tmpfiles-setup.service (it is pulled in by sysinit.target.wants).

Did you reboot since?
Comment by Orm Finnendahl (orm) - Wednesday, 16 February 2022, 12:50 GMT
> [2022-02-07T01:11:43+0100] [ALPM] installed postfix-pcre (3.7.0-2)

this one is missing, the rest is there, but I'm not positive I rebooted before the error happened.
Comment by David Runge (dvzrv) - Wednesday, 16 February 2022, 17:10 GMT
> this one is missing, the rest is there,

If you are not using PCRE in your configuration then you don't need postfix-pcre.

> but I'm not positive I rebooted before the error happened.

Hm, that is really odd. It might point at a larger issue with your system if systemd is not applying the tmpfiles.d integration. :-/

Are the /usr/bin/post{drop,queue} files writable by root (i.e. the mount options for / do not prevent it)? Is your / mounted rw? (check `mount |grep "on / "`).
Can you provide the output of `journalctl -b -u systemd-tmpfiles-setup` and also attempt to run `systemd-tmpfiles --create` as root (this is what is done by the libalpm hook via /usr/share/libalpm/scripts/systemd-hook)?
Comment by loqs (loqs) - Wednesday, 16 February 2022, 23:29 GMT
Could you please run that last command with debug level logging
# SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create
Comment by David Runge (dvzrv) - Friday, 25 February 2022, 10:20 GMT
@orm: Can you provide the required output for further debugging or is your problem resolved?

Loading...