Sample Header Ad - 728x90

Systemd unit only applies User, Group & RuntimeDirectoryMode settings on service restart

1 vote
1 answer
884 views
I'm using Fedora 28 x64 on a VPS. I've setup postfix as send-only mail server with OpenDKIM for signing outgoing emails. Postfix connects to OpenDKIM via unix socket setup on
/run/opendkim/opendkim.sock
Permission for
/run/opendkim/
is as follows
------.  2 opendkim opendkim   80 Jul 13 00:05 opendkim
For Postfix to connect to the OpenDKIM milter, I've changed
to
in the OpenDKIM unit file and added
=0750
. Here's the entire
.service
file. Location:
/usr/lib/systemd/system/opendkim.service
[Unit] Description=DomainKeys Identified Mail (DKIM) Milter Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html After=network.target remote-fs.target nss-lookup.target syslog.target [Service] Type=forking User=opendkim Group=postfix PIDFile=/run/opendkim/opendkim.pid EnvironmentFile=-/etc/sysconfig/opendkim ExecStart=/usr/sbin/opendkim $OPTIONS ExecReload=/bin/kill -USR1 $MAINPID RuntimeDirectory=opendkim RuntimeDirectoryMode=0750 [Install] WantedBy=multi-user.target The issue I'm facing is that the
,
,
values are only applied when I restart the OpenDKIM service manually. OpenDKIM is enabled to run on system boot via
enable opendkim
. But after rebooting the VPS, the directory permissions are the same.
------.  2 opendkim opendkim   80 Jul 13 00:05 opendkim
I've to run
restart opendkim
for the permissions to change to
-x---.  2 opendkim postfix   80 Jul 13 00:05 opendkim
Any idea why this happens? Anything I'm missing here?
Asked by user62867
Jul 12, 2018, 06:50 PM
Last activity: Jul 21, 2018, 09:24 PM