You are not logged in.

#1 Yesterday 11:51:41

yoshikart
Member
Registered: 2025-12-18
Posts: 1

Permission denied, but my user group has permission to access

Hello all,

I recently re-installed Arch Linux onto my laptop after deciding I wanted a fresh start.

Now, I want to set my user icon to appear in LightDM. The LightDM wiki page recommends I install AccountsService and store my desired user icon as .face in my home directory. However, this did not work and the default icon persisted.

After some investigation, I have discovered one possible reason as to what is causing this and that is LightDM does not have permission to access /var/lib/AccountsService/users which includes a file for my user pointing to the destination of my user photo. So I set the permissions recursively on the entire /var/lib/AccountsService directory:

sudo chown -R lightdm:lightdm /var/lib/AccountsService
sudo chmod -R 754 /var/lib/AccountsService

Thus giving any user in the lightdm group read and executable permissions on any file/folder in /var/lib/AccountsService.

My user is a member of the lightdm group. However, when I run ls -l /var/lib/AccountsService I get:

ls: cannot access '/var/lib/AccountsService/users': Permission denied
ls: cannot access '/var/lib/AccountsService/icons': Permission denied
total 0
d????????? ? ? ? ?            ? icons
d????????? ? ? ? ?            ? users

Yet when I run it as root:

total 8
drwxr-xr-- 2 lightdm lightdm 4096 Mar  4 11:18 icons
drwxr-xr-- 2 lightdm lightdm 4096 Mar  4 11:21 users

As a member of the lightdm group, I should be able to read this folder.

What is causing this and how can I fix this?

Last edited by yoshikart (Yesterday 11:53:08)

Offline

#2 Yesterday 13:53:26

-thc
Member
Registered: 2017-03-15
Posts: 1,095

Re: Permission denied, but my user group has permission to access

One possible explanation: You tried to access the directories immediately after setting the ownership/permission in another shell or via sudo/su.

Group membership access rights will be updated after the next login and/or (I'm not sure) restart of the shell.

Offline

#3 Yesterday 14:36:14

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 493

Re: Permission denied, but my user group has permission to access

yoshikart wrote:

As a member of the lightdm group...

Check membership with "id" or "groups" command.

-thc wrote:

or (I'm not sure) restart of the shell.

Restart of the shell will not work. "newgrp lightdm" should.

Offline

#4 Yesterday 15:54:07

-thc
Member
Registered: 2017-03-15
Posts: 1,095

Re: Permission denied, but my user group has permission to access

dimich wrote:

Restart of the shell will not work. "newgrp lightdm" should.

Good to know - thanks.

Offline

Board footer

Powered by FluxBB