2

When I do a find or du or something in ~/.cache I get an error:

$ ls ~/.cache/gnome-control-center
ls: cannot open directory /home/user1/.cache/gnome-control-center: Permission denied

It has weird permissions, which prevents the owner from reading or navigating into the directory (but the user's group can, if that were shared):

$ ls -ld ~/.cache/gnome-control-center
d-w-r-xr-T. 2 user1 user1 4096 Sep 30 16:51 /home/user1/.cache/gnome-control-center

That starts to look like a dropbox - write-only - but it's inconsistently applied such that 'group' and 'other' see it read-only and not write-only. Say (in the case for older corporate environments) you have a default group of user, then (because denial takes precedence, and permissions are read left-to-right), anyone could read that directory except the owner. And yet, they can't because the parent .cache is only readable & navigable by the owner.

I confirmed this happening to others. I guess I'm asking two questions:

  1. Is there a documented reason for this permissions tomfoolery?
  2. What possible reason is there for locking out the owner from a directory stored in their own homedir?
Rich
  • 823

1 Answers1

3

It's a bug and fixed in GNOME 3.30, see gitlab.gnome.org/GNOME/gnome-control-center/-/issues/49.

The issue is caused by an unsupported raw octal value 0700 for the permissions of the user directory which is wrongly converted to decimal 700. To fix this, the value needs to be written as string value '0700' in meson.build.

Source: github.com/GNOME/gnome-control-center/commit/37a6b940cb83d97b808da77f397e34100beb263f

build: Fix `USER_DIR_MODE` value in config.h

meson defines `USER_DIR_MODE` with a raw octal value to be used as the default permissions when creating the user's configuration directory.

However, meson does not support raw octal values[0], so the define misses the initial `0` value. Due to this, the directory is created with wrong permissions.

This has been changed to use the octal value as a string in meson, so the definition has the proper value.

Fixes #49

[0] mesonbuild/meson#2047

Freddy
  • 25,565