systemd breaks upgrade with useless error if /var is not owned by root

Bug #1891394 reported by Darxus
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I just upgraded from 16.04 to 18.04. The upgrade broke. The error, from systemd, was:

"Unsafe symlinks encountered in /var/log/journal, refusing."

That directory was empty. The fix was "chmod root:root /var". Yes, it's weird that my /var wasn't owned by root, but upgrade breaking errors should say something useful.

panic:~# chown darxus:darxus /var
panic:~# dpkg-reconfigure systemd
Unsafe symlinks encountered in /var/spool/rsyslog, refusing.
Unsafe symlinks encountered in /var/lib/colord, refusing.
Unsafe symlinks encountered in /var/lib/colord/icc, refusing.
Unsafe symlinks encountered in /var/cache/man, refusing.
Unsafe symlinks encountered in /var/run/opendkim, refusing.
Unsafe symlinks encountered in /var/lib/systemd, refusing.
Unsafe symlinks encountered in /var/lib/systemd/coredump, refusing.
Unsafe symlinks encountered in /var/log/wtmp, refusing.
Unsafe symlinks encountered in /var/log/btmp, refusing.
Unsafe symlinks encountered in /var/log/lastlog, refusing.
Unsafe symlinks encountered in /var/log, refusing.
Unsafe symlinks encountered in /var/log/auth.log, refusing.
Unsafe symlinks encountered in /var/log/mail.err, refusing.
Unsafe symlinks encountered in /var/log/mail.log, refusing.
Unsafe symlinks encountered in /var/log/kern.log, refusing.
Unsafe symlinks encountered in /var/log/syslog, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal/6118992be5f52430d74ed66e4cc8d590, refusing.
Unsafe symlinks encountered in /var/log/journal/6118992be5f52430d74ed66e4cc8d590, refusing.
Unsafe symlinks encountered in /var/log/journal/6118992be5f52430d74ed66e4cc8d590, refusing.
Unsafe symlinks encountered in /var/log/journal/6118992be5f52430d74ed66e4cc8d590, refusing.
Unsafe symlinks encountered in /var/log/journal/6118992be5f52430d74ed66e4cc8d590/system.journal, refusing.
Unsafe symlinks encountered in /var/log/journal/6118992be5f52430d74ed66e4cc8d590/system.journal, refusing.
panic:~# chown root:root /var
panic:~# dpkg-reconfigure systemd

I found the fix here: https://askubuntu.com/a/1095796
Showing that I'm not the only one encountering this.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: systemd 237-3ubuntu10.42
Uname: Linux 5.6.14-x86_64-linode135 x86_64
ApportVersion: 2.20.9-0ubuntu7.16
Architecture: i386
Date: Wed Aug 12 15:58:33 2020
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: QEMU Standard PC (Q35 + ICH9, 2009)
ProcKernelCmdLine: root=/dev/sda console=tty1 console=ttyS0 ro devtmpfs.mount=1
ProcModules:

SourcePackage: systemd
UpgradeStatus: Upgraded to bionic on 2020-08-12 (0 days ago)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-q35-3.1
dmi.modalias: dmi:bvnSeaBIOS:bvrrel-1.12.0-0-ga698c8995f-prebuilt.qemu.org:bd04/01/2014:svnQEMU:pnStandardPC(Q35+ICH9,2009):pvrpc-q35-3.1:cvnQEMU:ct1:cvrpc-q35-3.1:
dmi.product.name: Standard PC (Q35 + ICH9, 2009)
dmi.product.version: pc-q35-3.1
dmi.sys.vendor: QEMU

Revision history for this message
Darxus (darxus) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

If your /var is not owned by root, your system is insecure. Why was /var not owned by root?

Revision history for this message
Balint Reczey (rbalint) wrote :

Who owned /var?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Dan Streetman (ddstreet) wrote :

seems to require 7f0704da9454d36d19920e033ddadf06c9c6441e

Revision history for this message
Darxus (darxus) wrote :

Var was owned by the user I usually log in as. I don't know why, yes it's weird, I fixed it. I don't think that justifies this package's upgrade braking behavior.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
Darxus (darxus)
Changed in systemd (Ubuntu):
status: Expired → New
Revision history for this message
Dan Streetman (ddstreet) wrote :

I can reproduce the warning messages, but they don't actually cause the package upgrades to fail. If your release upgrade failed, it seems like it's due to some other problem.

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.