In Ubuntu, rsyslog is (a) part of the minimal image and (b) does not run as root. To facilitate this, the rsyslog package configures /var/log to be writeable by the syslog group. There are currently conflicts in the Ubuntu packaging due to the way tmpfiles are handled in package scripts: when systemd-tmpfiles is invoked with both configurations (or for all configurations), things work fine. But if invoked with only var.conf, which is the default case for package upgrades, rsyslog is broken. One suggestion to approach this was to make rsyslog's tmpfile configuration use ACLs instead of trying to change the owning group and directory mode. This can work, but since the ACL mask is stored in the group permission bits, the effective mask for rsyslog becomes r-x again when var.conf is invoked, because it sees that 0775 != 0755, and chmods the directory. Hence, for /var/log write permisssions to be extendable with ACLs, the mode must be at least 0775. Rather than change the default, add a build option to configure the /var/log mode.
26 lines
614 B
Plaintext
26 lines
614 B
Plaintext
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# See tmpfiles.d(5) for details.
|
|
|
|
q /var 0755 - - -
|
|
|
|
L /var/run - - - - ../run
|
|
|
|
d /var/log {{VAR_LOG_MODE}} - - -
|
|
{% if ENABLE_UTMP %}
|
|
f /var/log/wtmp 0664 root utmp -
|
|
f /var/log/btmp 0660 root utmp -
|
|
f /var/log/lastlog 0664 root utmp -
|
|
{% endif %}
|
|
|
|
d /var/cache 0755 - - -
|
|
|
|
d /var/lib 0755 - - -
|
|
|
|
d /var/spool 0755 - - -
|