Dolphin seems not to respect default ACLs on directories

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

related ? 267209 – Dolphin gets nfs4 shared ownership and permissions wrong

You have pretty much a bug report nicely documented.

The bug is in frameworks-kio which is used by dolphin and krusader.

I would recommend you to report a bug at Log in to KDE Bugtracking System

I have made a patch:

Great, I filed 475150 – Dolphin seems not to respect default ACLs on directories

cheers

Any way to provoke some action on the bugreport?

No the bug report is great with a simple and reproducible way to reproduce the bug, there is a MR that would fix the issue but raised some other issues and that needs to be resolved as the MR would regress things elsewhere, give it some time, and you can ping.