Warning: directory permissions differ on /var/lib/AccountsService/

Greetings lovely community,

I had a few updates today (I ran yay in the morning, afternoon, and evening time), and the package accountsservice got updated twice, once in the morning time and again another update for it when I ran yay just now. Only this second time I got the following warning:

warning: directory permissions differ on /var/lib/AccountsService/
filesystem: 755  package: 775

I’ve search the forums and have seen similar issues to this reported, though not always the same package came up on the forums HERE and HERE, but the solutions do differ a little bit (sudo chmod g+w vs sudo chmod go-rw), so I’m not sure what would be the proper course of action if any in this particular case.

Should I simply wait for another accountservice update to be release to address this or will this require some manual intervention on my part? I don’t notice any issues outside of the warning message, so I can’t say yet for certain if this is truly a problem or not, but as with any warning message I see in pacman, I always do like to consult this forum for some guidance and assurances.

Please let me know if there’s anything I should do and thank you for any help, it’s always much appreciated.

Here’s my full yay update for this package:

[scott@endeavourOS ~]$ yay
[sudo] password for scott: 
:: Synchronizing package databases...
 core is up to date
 extra                1555.7 KiB  1255 KiB/s 00:01 [-----------------------] 100%
 community               6.0 MiB   802 KiB/s 00:08 [-----------------------] 100%
 multilib is up to date
 endeavouros is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Package (1)            Old Version  New Version  Net Change  Download Size

extra/accountsservice  22.04.62-1   22.04.62-2     0.00 MiB       0.16 MiB

Total Download Size:   0.16 MiB
Total Installed Size:  0.95 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 accountsservice-...   161.4 KiB   598 KiB/s 00:00 [-----------------------] 100%
(1/1) checking keys in keyring                     [-----------------------] 100%
(1/1) checking package integrity                   [-----------------------] 100%
(1/1) loading package files                        [-----------------------] 100%
(1/1) checking for file conflicts                  [-----------------------] 100%
(1/1) checking available disk space                [-----------------------] 100%
:: Processing package changes...
(1/1) upgrading accountsservice                    [-----------------------] 100%
warning: directory permissions differ on /var/lib/AccountsService/
filesystem: 755  package: 775
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Reloading system bus configuration...
(4/4) Checking which packages need to be rebuilt
:: Searching databases for updates...
:: Searching AUR for updates...
:: Checking development packages...
 -> Flagged Out Of Date AUR Packages:  gdm-prime  libgdm-prime  minecraft-launcher  optimus-manager
 there is nothing to do
[scott@endeavourOS ~]$ 

Nice that you brought this up!
I got also the same warning after the update to the package AccountsService.

However when I run ls -al /var/lib, I get:

drwxrwxr-x 1 root root 20 Aug 28 22:09 AccountsService

which would mean that permissions are 775 and not 755 for the directory in the filesystem, if I am not mistaken. Color me :confused:

Apparently permissions should be 775 instead of 755:

To fix this you can manually amend the permissions on the existing directory so that they are in line with the ones from the package.

sudo chmod 775 /var/lib/AccountsService

I don’t really see where this would make a difference though. It just gives write permissions to the root group. Normally you’d only have the root user itself in that group anyways…

3 Likes

This is just an idea, perhaps someone logged in as root uses the first root (name) and sudo uses the root (group)?

Makes sense as the admin could set up a permissions as 755 then only someone logged in as root could write and someone using sudo cannot write. This would be a way for an admin to limit what a user given sudo rights as to what they can write to?

If anyone knows for certain, please chime in and correct me if I’m wrong.

Pudge

No, when you use sudo it is changing your uid and gid.

>> sudo id                                                                                                                                      
uid=0(root) gid=0(root) groups=0(root)
1 Like

You should either ignore that warning or change the permissions manually.

sudo chmod g+w /var/lib/AccountsService
1 Like

Two different commands that accomplish the same thing or? Not sure exactly which one to go with. Would appreciate any clarification to the differences, if any between these commands, thanks.

The first command explicitly sets the permissions to 775 ignoring whatever they were before.

The second adds write permissions to the group.

In your specific case the end effect will be the same even though the commands do different things.

I generally prefer to use relative mode changes because they are safer, especially when used recursively. However, in this case, it makes no difference. Feel free to use either.

5 Likes

Thanks very much for the clarification to help broaden my understanding of this even more, that was both informative and helpful. EndeavourOS forums ftw :slight_smile:

5 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.