Having since a while serious problems with dolphin not respecting default ACLs on directories when copying files.
We’re running Arch Linux 6.1.55-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 23 Sep 2023 16:57:15 +0000 x86_64 GNU/Linux
on the server, and EndeavourOS Linux 6.1.55-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 23 Sep 2023 16:57:15 +0000 x86_64 GNU/Linux
on the clients.
But I can reproduce the problem on just the clients.
We use PAM having
/etc/pam.d/system-login:session optional pam_umask.so usergroups umask=0077
such that umask
is by default 0007
and, for example, the users involved are members of the users
group and by default have their group name the same as their username… pretty much all vanilla so far. (1)
if I create a test directory as follows in /tmp:
$ mkdir testacl
$ chown richard:users testacl/
$ chmod g+s testacl/
$ setfacl -d -m group:users:rwx testacl
$ getfacl testacl/
# file: testacl/
# owner: richard
# group: users
# flags: -s-
user::rwx
group::rwx
other::---
default:user::rwx
default:group::rwx
default:group:users:rwx
default:mask::rwx
default:other::---
create files to copy:
$ touch f-bash f-dolphin f-nautilus
$ ls -la f-*
-rw-rw---- 1 richard richard 0 28 sept. 16:05 f-bash
-rw-rw---- 1 richard richard 0 28 sept. 16:05 f-dolphin
-rw-rw---- 1 richard richard 0 28 sept. 16:05 f-nautilus
Now, control test that things are setup as expected with bash
$ cp f-bash testacl/
$ getfacl testacl/f-bash
# file: testacl/f-bash
# owner: richard
# group: users
user::rw-
group::rwx #effective:rw-
group:users:rwx #effective:rw-
mask::rw-
other::---
great, copied file gets group changed to users
and group permissions are OK.
But when dolphin copies its file to the test directory, the following is the result:
$ getfacl testacl/f-dolphin
# file: testacl/f-dolphin
# owner: richard
# group: richard
user::rw-
group::rwx #effective:rw-
group:users:rwx #effective:rw-
mask::rw-
other::---
Notice that the copied file’s group didn’t get correctly updated.
If I try with nautilus, the expected behaviour is seen, that is just like if one used cp
.
What gives?
cheers,
Richard
BTW there seems to be additional issues involved when using NFS4, but one thing at a time here.
*(1)* usergroups
If the user is not root and the username is the same as primary group name, the umask
group bits are set to be the same as owner bits (examples: 022 -> 002, 077-> 007).```
[added 29/9/23]
tried also krusader
, thunar
and mc
(aka midnight commander)…
krusader
behaves like dolphin
, but thunar
and mc
work as expected.
Unfortunately I can’t see asking our users to start using mc
in an environment such as KDE,
whereas if we need to use thunar
perhaps we need to move to XFCE.
BTW, not sure, but possibly related to the bug filed with okular
https://bugs.kde.org/show_bug.cgi?id=473474