Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu PPA package does not provide override for default 0755 /var/log permissions applied by systemd #61

Open
deoren opened this issue Jul 12, 2017 · 8 comments

Comments

@deoren
Copy link

deoren commented Jul 12, 2017

See rsyslog/rsyslog#1655 for details.

@friedl
Copy link
Contributor

friedl commented Nov 10, 2017

Need more details on where to change this.

@deoren
Copy link
Author

deoren commented Nov 10, 2017

Background

The /usr/lib/tmpfiles.d/00rsyslog.conf file is provided by the stock Ubuntu rsyslog package. Users can create their own overrides within the /etc/tmpfiles.d/ directory.

If an Ubuntu 16.04 system is used, then activating the PPA and upgrading rsyslog to the latest version leaves behind the orphaned Ubuntu-provided /usr/lib/tmpfiles.d/00rsyslog.conf file.

If an Ubuntu 14.04 system is used, activating the PPA installs the latest rsyslog package(s), but does not provide that file. As long as the system remains at 14.04 no problems are noticed with permissions on /var/log. Upgrading to 16.04 does not provide the /usr/lib/tmpfiles.d/00rsyslog.conf file since the provided version of rsyslog from the PPA is higher than the version available from the stock Ubuntu 16.04 repo(s).

Permissions on a freshly installed 16.04 box

ubuntu@ubuntu-virtual-machine:~$ getfacl /var/log

getfacl: Removing leading '/' from absolute path names
# file: var/log
# owner: root
# group: syslog
user::rwx
group::rwx
other::r-x

systemd tmpfiles.d override provided by Ubuntu

Proving what package provided the file:

ubuntu@ubuntu-virtual-machine:~$ dpkg -S /usr/lib/tmpfiles.d/00rsyslog.conf

rsyslog: /usr/lib/tmpfiles.d/00rsyslog.conf

Version currently installed (and where it came from):

ubuntu@ubuntu-virtual-machine:~$ dpkg -l rsyslog

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                          Version                     Architecture                Description
+++-=============================================-===========================-===========================-===============================================================================================
ii  rsyslog                                       8.16.0-1ubuntu3             amd64                       reliable system and kernel logging daemon

Contents of override file:

ubuntu@ubuntu-virtual-machine:~$ cat /usr/lib/tmpfiles.d/00rsyslog.conf

# Override systemd's default tmpfiles.d/var.conf to make /var/log writable by
# the syslog group, so that rsyslog can run as user.
# See tmpfiles.d(5) for details.

# Type Path    Mode UID  GID  Age Argument
d /var/log 0775 root syslog -

Thoughts

Since the original package provides the /usr/lib/tmpfiles.d/00rsyslog.conf file, it seems like a good idea for the PPA-provided package to provide the same file. If the file exists, then I assume that the package provided file would (following the default behavior of existing files) be set aside as /usr/lib/tmpfiles.d/00rsyslog.conf.dpkg-new. If not and the original /usr/lib/tmpfiles.d/00rsyslog.conf file is overwritten, then users essentially get their knuckles popped for going against the established practice of placing custom files within /etc instead of system locations (such as /usr/lib/tmpfiles.d/00rsyslog.conf).

@rgerhards
Copy link
Member

My 2cts: I think it would be useful to keep as close as possible to the original Ubuntu package. It might be a good idea to pull the Ubuntu source package definitions for 16.04 and re-apply them to the PPA, just making those changes that are actually necessary.

PR's are for sure also happily accepted (packaging is not a core competency over here, we just provide "as good as possible" service to serve some need ;-)).

@rgerhards
Copy link
Member

rgerhards commented Nov 10, 2017

And I should mention that we hopefully nailed today why the issue/PR trackers received so little attention in the past. I think we can consider that solved ;-)

@deoren
Copy link
Author

deoren commented Nov 10, 2017

@rgerhards: My 2cts: I think it would be useful to keep as close as possible to the original Ubuntu package. It might be a good idea to pull the Ubuntu source package definitions for 16.04 and re-apply them to the PPA, just making those changes that are actually necessary.

That makes sense to me.

@rgerhards: PR's are for sure also happily accepted (packaging is not a core competency over here, we just provide "as good as possible" service to serve some need ;-)).

Understood. I don't have experience building packages, otherwise I would offer a PR. Maybe in the future once I have some experience (this is a particular interest of mine).

@rgerhards: And I should mention that we hopefully nailed today why the issue/PR trackers received so little attention in the past. I think we can consider that solved ;-)

A technical issue with a notification system?

@rgerhards
Copy link
Member

Maybe in the future once I have some experience (this is a particular interest of mine).

(Y)

A technical issue with a notification system?

... kind of ;-) Let's call it "filters going overboard".

@deoren
Copy link
Author

deoren commented Nov 10, 2017

@rgerhards: Let's call it "filters going overboard"..

Heh, I've been there. Glad you have it sorted.

If I assist further with this please let me know. I have easy access to Ubuntu 14.04 and 16.04 systems, so I don't mind helping test any changes your team would like to apply to the packages.

@rgerhards
Copy link
Member

@deoren I have opened #69 to not pollute this tracker too much

wjordan added a commit to wjordan/rsyslog-pkg-ubuntu that referenced this issue Jan 8, 2020
Override systemd's default tmpfiles.d/var.conf to make
/var/log writable by the syslog group,
so that rsyslog can run as user.
Fixes rsyslog#61.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants