[Bug 1577001] Re: Installing lxd leaves /var/lib/lxd/unix.socket with wrong group ownership

Dan Kegel dank at kegel.com
Mon May 2 17:13:57 UTC 2016

@martin: I'm on desktop, fwiw.  I think you nailed it:

apt-cache policy lxd systemd
# lxd:
#   Candidate: 2.0.0-0ubuntu4
# systemd:
#   Installed: 229-4ubuntu4
# Clean initial conditions
sudo apt purge -y lxd || true
sudo systemctl stop lxd.socket || true
sudo rm -f /var/lib/lxd/unix.socket
echo "Demonstrate proper functioning on first install"
sudo apt install -y lxd
ls -l /var/lib/lxd/unix.socket
# srw-rw---- 1 root lxd 0 May  2 10:10 /var/lib/lxd/unix.socket

echo "Purge (bug: leaves lxd.socket running, leaves unix.socket present!)"
sudo apt purge -y lxd 
ls -l /var/lib/lxd/unix.socket
# srw-rw---- 1 root lxd 0 May  2 10:10 /var/lib/lxd/unix.socket

echo "Reinstall (bug: breaks group ownership of unix.socket!)"
sudo apt install -y lxd
ls -l /var/lib/lxd/unix.socket
# srw-rw---- 1 root root 0 May  2 10:10 /var/lib/lxd/unix.socket

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.

  Installing lxd leaves /var/lib/lxd/unix.socket with wrong group

Status in lxd package in Ubuntu:
Status in systemd package in Ubuntu:

Bug description:
  On ubuntu 16.04, doing
    sudo apt-get install lxd
  sometimes leaves the file
  with group root, but it should have group lxd.   Doing
    sudo systemctl restart lxd.socket
  rescues the file and gives it the right group ownership.

  Adding logging to the package's postinst shows that, if /var/lib/lxd/unix.socket did not already exist, it is created by the line
   deb-systemd-helper enable lxd.service
  and with the wrong group permissions.
  If the socket already existed with the correct group ownership that command breaks the permissions and sets it to be group root.

  It's about 90% repeatable on one machine here (with an SSD main disk).

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: lxd 2.0.0-0ubuntu4
  ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
  Uname: Linux 4.4.0-21-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Sat Apr 30 08:24:53 2016
  InstallationDate: Installed on 2016-03-26 (35 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Beta amd64 (20160323)
  SourcePackage: lxd
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list