On Aug 17, 2017, at 9:19 AM, Matt Simpson dclist@list.jmatt.net wrote:
I have an issue that surfaced when I tried to start using the new metrics service, but it looks like it may be a more generic issue.
When I took a closer look at this, it might be a problem with the FreeBSD packaging of dovecot, and not in dovecot itself.
I’m running FreeBSD 11, and installed dovecot as a package using standard FreeBSD package utilities. The install process creates a start/stop script, and that script is creating the /var/run/dovecot directory at startup and removing it at shutdown.
The command which creates the directory is
/usr/bin/install -o root -g wheel -m 0755 -d ${base_dir}
which apparently just creates a directory with the specified owner and group.
At this point, I’m a little confused about the best way to proceed. Any other FreeBSD dovecot users here? Currently, it looks like the startup script is creating /var/run/dovecot, owned by root. Then dovecot creates /var/run/dovecot/stats-mail, also owned by root. I could possibly alter the startup script to create /var/run/dovecot owned by dovecot instead of root, but I don’t think that will change the ownership of stats-mail, which seems to be created by dovecot running as root, and then attempted to write by dovecot running as a different user. Does anybody know what’s going on here?