LightDM doesn't take full ownership of /var/lib/lightdm which can prevent lightdm from starting

Bug #1055783 reported by Jeremy Bicha on 2012-09-24
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
High
Matt Fischer

Bug Description

1. Install lightdm
2. Remove lightdm
3. Install some random package that adds a new system user
4. Install unity-greeter which pulls in lightdm
5. Set lightdm as default and either reboot or kill any other dm's and sudo service lightdm start

What should happen
================
You get the pretty Unity greeter

What does happen
===============
You get the X failed to start box.

During the install in step 4, I got this output:

Setting up lightdm (1.3.3-0ubuntu4) ...
Adding group `lightdm' (GID 131) ...
Done.
Warning: The home dir /var/lib/lightdm you specified already exists.
Adding system user `lightdm' (UID 119) ...
Adding new user `lightdm' (UID 119) with group `lightdm' ...
The home directory `/var/lib/lightdm' already exists. Not copying from `/etc/skel'.
adduser: Warning: The home directory `/var/lib/lightdm' does not belong to the user you are currently creating.
usermod: no changes
usermod: no changes
usermod: no changes

I verified that /var/lib/lightdm was owned by lightdm:lightdm. However, there are a bunch of left-over dot files and directories inside /var/lib/lightdm that are owned by some other random system user.

Proposed fix
==========
This in debian/lightdm.postinst should be recursive:

if [ -d /var/lib/lightdm ]; then
  chown lightdm:lightdm /var/lib/lightdm
  chmod 0750 /var/lib/lightdm
fi

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: lightdm 1.3.3-0ubuntu4
ProcVersionSignature: Ubuntu 3.5.0-15.22-generic 3.5.4
Uname: Linux 3.5.0-15-generic x86_64
ApportVersion: 2.5.2-0ubuntu4
Architecture: amd64
Date: Mon Sep 24 16:58:04 2012
SourcePackage: lightdm
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Jeremy Bicha (jbicha) wrote :
Changed in lightdm (Ubuntu):
status: New → Triaged
importance: Undecided → High
Matt Fischer (mfisch) on 2012-10-15
Changed in lightdm (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Matt Fischer (mfisch)
Matt Fischer (mfisch) on 2012-11-08
Changed in lightdm (Ubuntu):
status: In Progress → Fix Committed
Robert Ancell (robert-ancell) wrote :

Was fixed in 1.4.0-0ubuntu3

Changed in lightdm (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.

Duplicates of this bug

Other bug subscribers