#869535 lightdm: service fails to start due to incorrect data dir perms

Package:
lightdm
Source:
lightdm
Description:
simple display manager
Submitter:
Jonathan Lane
Date:
2021-10-17 17:45:10 UTC
Severity:
important
#869535#5
Date:
2017-07-24 02:46:51 UTC
From:
To:
Dear Maintainer,

The permissions on /var/lib/lightdm/data/ are root:root 755 instead of lightdm:lightdm 750 on install.  This breaks lightdm and renders the system unusable to anyone who doesn't know how to grab a shell via SSH or console TTY shifting.  A simple permissions change fixes it.

#869535#10
Date:
2017-07-30 13:19:56 UTC
From:
To:
I'm a bit confused here, could you elaborate a little?

/var/lib/lightdm is created at postinst time with lightdm:lightdm and 0750
permission.

/var/lib/lightdm/data is created at runtime and it should be lightdm:lightdm
since it's created by a process running as lightdm user.

Also, it works just fine by default everywhere else I think, so I think you
need to be a little bit more specific so we can find what the issue is.

Regards,

#869535#15
Date:
2017-11-15 16:22:19 UTC
From:
To:
Package: lightdm
Version: 1.18.3-1
Followup-For: Bug #869535

I installed lightdm the other day and it did the same thing.  Luckily it told
me what the problem was, and as I recall it mentioned /data and permissions.
Nothing in the logs about it that I can find.

#869535#20
Date:
2021-10-17 17:22:23 UTC
From:
To:
I've also seem this warning message and the root.root permissions on
/var/lib/lightdm/data/

This system previously had a very minimal (debootstrap'd)
Debian Bullseye installation. I then did:

# apt-get install openbox lightdm

and rebooted. X starts and shows a background image but there are
no login controls or anything else. On this first boot,
/var/log/lightdm/lightdm.log says:

[+0.06s] WARNING: Could not enumerate user data directory /var/lib/lightdm/data: Error opening directory '/var/lib/lightdm/data': No such file or directory

Looking at the permissions:

# ls -ld /var
drwxr-xr-x 12 root root 4096 Oct 11 16:36 /var

# ls -ld /var/lib
drwxr-xr-x 23 root root 4096 Oct 17 16:34 /var/lib

# ls -ld /var/lib/lightdm/
drwxr-x--- 4 lightdm lightdm 4096 Oct 17 16:36 /var/lib/lightdm/

# ls -ld /var/lib/lightdm/data/
drwxr-xr-x 3 root root 4096 Oct 17 16:36 /var/lib/lightdm/data/

# ls -ld /var/lib/lightdm/data/lightdm/
drwxrwx--- 2 lightdm lightdm 4096 Oct 17 16:36 /var/lib/lightdm/data/lightdm/

# ls -l /var/lib/lightdm/data/lightdm/
total 0

Observe the ownership going down the hierarchy is root then lightdm
then root then lightdm, which seems peculiar.

On the second boot, this warning was not shown - presumably the
missing directory was created on the first boot albeit with the
surprising ownership. lightdm still didn't work, but that was due
to other issues.....


Regards, Phil.