non persistent logging after cleaning log files on disk

Bug #1401984 reported by Sebastien Bacher on 2014-12-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rsyslog (Ubuntu)
High
Martin Pitt

Bug Description

Using current vivid with systemd init, I've cleaned the log on disk (*.log syslog dmesg) and rebooted my test box, since then it stopped logging to syslog.

journalctl has the log from the current boot but not from previous ones

the behaviour there is a bit confusing, I first though that I would get a fresh syslog on next boot and not an auto conversion to use journald, then the journal should keep record from previous boots as well...

Didier Roche (didrocks) wrote :

Actually, this is not a systemd behavior but seems to be a syslog one.
1. rm /var/log/syslog
2. reboot
-> no log (under systemd or upstart)
3. touch /var/log/syslog
4. chmod syslog:adm /var/log/syslog
5. reboot
-> logs availables

The cause is that /var/log is 755 and root:syslog (I wonder why it's in syslog group as it's not 775?), and so can't recreate the file.
If I chmod syslog, indeed, /var/log/syslog is created, but with other rights, being syslog:syslog instead of syslog:adm.

So, it worths more discussion (retargetting to syslog), pinging Martin on this.

affects: systemd (Ubuntu) → rsyslog (Ubuntu)
Martin Pitt (pitti) wrote :

rsyslog's postinst seems fine. I have a gut feeling that this is due to /usr/lib/tmpfiles.d/var.conf changing it back to 0755, the permissions are wrong there.

affects: rsyslog (Ubuntu) → systemd (Ubuntu)
Martin Pitt (pitti) wrote :

Ah, our rsyslog has a delta, so let's stick a matching tmpfiles.d/ snippet into rsyslog.

affects: systemd (Ubuntu) → rsyslog (Ubuntu)
Changed in rsyslog (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Martin Pitt (pitti) on 2014-12-16
Changed in rsyslog (Ubuntu):
importance: Undecided → High
status: In Progress → Fix Committed
tags: added: systemd-boot
Didier Roche (didrocks) wrote :

Note that the bug will still be present under upstart, but nothing new, for reference: http://irclogs.ubuntu.com/2014/12/16/%23ubuntu-desktop.html#t13:10 :)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rsyslog - 7.4.4-1ubuntu12

---------------
rsyslog (7.4.4-1ubuntu12) vivid; urgency=medium

  * Install debian/00rsyslog.conf tmpfiles.d snippet to ensure that the syslog
    group can write into /var/log/. (LP: #1401984)
 -- Martin Pitt <email address hidden> Tue, 16 Dec 2014 14:33:34 +0100

Changed in rsyslog (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers