Bug 477526 - NFS Mounts with all_squash,root_squash,anonuid=0,anongid=0 not able to modify files anymore
Summary: NFS Mounts with all_squash,root_squash,anonuid=0,anongid=0 not able to modify...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: qt6, regression
Depends on:
Blocks:
 
Reported: 2023-11-25 20:41 UTC by Jessica M
Modified: 2024-03-27 11:03 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jessica M 2023-11-25 20:41:26 UTC
SUMMARY
On KDE 6 dolphin is no longer able to create new files/folders or move things with copy/cut/paste if file permissions are 755 if you are on an NFS share with root squash. The options are now greyed out. Strangely enough you are still able to drag folders from one directory to another. This wasn't an issue on KDE 5 so I'm assuming this bug was added recently.


STEPS TO REPRODUCE
1. Setup nfs share with all_squash,root_squash,anonuid=0,anongid=0 in exports
2. Add share in fstab (I'm using nfs 4.2)
3. Reboot

OBSERVED RESULT
Greyed out file management options on folders with permissions 755 or below

EXPECTED RESULT
file management options should be allowed

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux 6.6.2-arch1-1
(available in About System)
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Comment 1 Jessica M 2023-11-28 02:22:45 UTC
I think this bug may be related to https://invent.kde.org/frameworks/kio/-/merge_requests/1221
Comment 2 Méven Car 2023-12-21 09:30:19 UTC
Context:
"[NFS] Root squash is a special mapping that maps remote root user (uid 0) to local "nobody" user (uid 65534), which has minimal privileges."
https://wiki.ubuntu.com/nobody
https://systemd.io/UIDS-GIDS/
Apparently the name of the nobody user and the UID of this user varies across distributions, what a nightmare.

Could you share the result of the command "ls -l" from the root of your NFS mount (or any subfolder in your NFS mount).
Comment 3 Bug Janitor Service 2023-12-21 10:48:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1520
Comment 4 Jessica M 2023-12-21 22:50:54 UTC
(In reply to Méven Car from comment #2)
> Context:
> "[NFS] Root squash is a special mapping that maps remote root user (uid 0)
> to local "nobody" user (uid 65534), which has minimal privileges."
> https://wiki.ubuntu.com/nobody
> https://systemd.io/UIDS-GIDS/
> Apparently the name of the nobody user and the UID of this user varies
> across distributions, what a nightmare.
> 
> Could you share the result of the command "ls -l" from the root of your NFS
> mount (or any subfolder in your NFS mount).

I scrubbed the filenames:

-rw-r--r-- 1 root root  83380287608 Apr 29  2023 filename
-rw-r--r-- 1 root root  37506258221 Dec 28  2021 filename
-rw-r--r-- 1 root root  58277271060 Nov 21  2022 filename
-rw-r--r-- 1 root root  66487217431 Aug  5 16:28 filename
-rw-r--r-- 1 root root  72429881854 Dec 20 06:37 filename
-rw-r--r-- 1 root root  45531612882 Mar 29  2022 filename
-rw-r--r-- 1 root root  60576715981 Nov 17 17:21 filename
-rw-r--r-- 1 root root  80527093663 Oct 27 16:53 filename
-rw-r--r-- 1 root root  52836231162 Nov 24 17:55 filename
Comment 5 Méven Car 2023-12-22 09:06:15 UTC
(In reply to Jessica M from comment #4)
> (In reply to Méven Car from comment #2)
> > Context:
> > "[NFS] Root squash is a special mapping that maps remote root user (uid 0)
> > to local "nobody" user (uid 65534), which has minimal privileges."
> > https://wiki.ubuntu.com/nobody
> > https://systemd.io/UIDS-GIDS/
> > Apparently the name of the nobody user and the UID of this user varies
> > across distributions, what a nightmare.
> > 
> > Could you share the result of the command "ls -l" from the root of your NFS
> > mount (or any subfolder in your NFS mount).
> 
> I scrubbed the filenames:
> 
> -rw-r--r-- 1 root root  83380287608 Apr 29  2023 filename
> -rw-r--r-- 1 root root  37506258221 Dec 28  2021 filename
> -rw-r--r-- 1 root root  58277271060 Nov 21  2022 filename
> -rw-r--r-- 1 root root  66487217431 Aug  5 16:28 filename
> -rw-r--r-- 1 root root  72429881854 Dec 20 06:37 filename
> -rw-r--r-- 1 root root  45531612882 Mar 29  2022 filename
> -rw-r--r-- 1 root root  60576715981 Nov 17 17:21 filename
> -rw-r--r-- 1 root root  80527093663 Oct 27 16:53 filename
> -rw-r--r-- 1 root root  52836231162 Nov 24 17:55 filename

Is that on the server or the client ?
I was meaning on the client side.
Also there are not folders.
Comment 6 Jessica M 2023-12-22 12:19:34 UTC
(In reply to Méven Car from comment #5)
> (In reply to Jessica M from comment #4)
> > (In reply to Méven Car from comment #2)
> > > Context:
> > > "[NFS] Root squash is a special mapping that maps remote root user (uid 0)
> > > to local "nobody" user (uid 65534), which has minimal privileges."
> > > https://wiki.ubuntu.com/nobody
> > > https://systemd.io/UIDS-GIDS/
> > > Apparently the name of the nobody user and the UID of this user varies
> > > across distributions, what a nightmare.
> > > 
> > > Could you share the result of the command "ls -l" from the root of your NFS
> > > mount (or any subfolder in your NFS mount).
> > 
> > I scrubbed the filenames:
> > 
> > -rw-r--r-- 1 root root  83380287608 Apr 29  2023 filename
> > -rw-r--r-- 1 root root  37506258221 Dec 28  2021 filename
> > -rw-r--r-- 1 root root  58277271060 Nov 21  2022 filename
> > -rw-r--r-- 1 root root  66487217431 Aug  5 16:28 filename
> > -rw-r--r-- 1 root root  72429881854 Dec 20 06:37 filename
> > -rw-r--r-- 1 root root  45531612882 Mar 29  2022 filename
> > -rw-r--r-- 1 root root  60576715981 Nov 17 17:21 filename
> > -rw-r--r-- 1 root root  80527093663 Oct 27 16:53 filename
> > -rw-r--r-- 1 root root  52836231162 Nov 24 17:55 filename
> 
> Is that on the server or the client ?
> I was meaning on the client side.
> Also there are not folders.

this is client side, here is an output with folders:

drwx------ 3 root root  36 Dec 22 00:20 foldername/
drwxr-xr-x 3 root root   3 Dec 13 13:50 foldername2/
drwxr-xr-x 2 root root 304 Dec 20 12:23 foldername3/
drwxr-xr-x 3 root root   9 Dec 13 02:11 foldername4/

anonuid and anongid are set to 0, making them all appear as root, but I'm still able to read and write to them without being root
Comment 7 Méven Car 2023-12-22 15:38:43 UTC
(In reply to Jessica M from comment #6)
> (In reply to Méven Car from comment #5)
> > (In reply to Jessica M from comment #4)
> > > (In reply to Méven Car from comment #2)
> > > > Context:
> > > > "[NFS] Root squash is a special mapping that maps remote root user (uid 0)
> > > > to local "nobody" user (uid 65534), which has minimal privileges."
> > > > https://wiki.ubuntu.com/nobody
> > > > https://systemd.io/UIDS-GIDS/
> > > > Apparently the name of the nobody user and the UID of this user varies
> > > > across distributions, what a nightmare.
> > > > 
> > > > Could you share the result of the command "ls -l" from the root of your NFS
> > > > mount (or any subfolder in your NFS mount).
> > > 
> > > I scrubbed the filenames:
> > > 
> > > -rw-r--r-- 1 root root  83380287608 Apr 29  2023 filename
> > > -rw-r--r-- 1 root root  37506258221 Dec 28  2021 filename
> > > -rw-r--r-- 1 root root  58277271060 Nov 21  2022 filename
> > > -rw-r--r-- 1 root root  66487217431 Aug  5 16:28 filename
> > > -rw-r--r-- 1 root root  72429881854 Dec 20 06:37 filename
> > > -rw-r--r-- 1 root root  45531612882 Mar 29  2022 filename
> > > -rw-r--r-- 1 root root  60576715981 Nov 17 17:21 filename
> > > -rw-r--r-- 1 root root  80527093663 Oct 27 16:53 filename
> > > -rw-r--r-- 1 root root  52836231162 Nov 24 17:55 filename
> > 
> > Is that on the server or the client ?
> > I was meaning on the client side.
> > Also there are not folders.
> 
> this is client side, here is an output with folders:
> 
> drwx------ 3 root root  36 Dec 22 00:20 foldername/
> drwxr-xr-x 3 root root   3 Dec 13 13:50 foldername2/
> drwxr-xr-x 2 root root 304 Dec 20 12:23 foldername3/
> drwxr-xr-x 3 root root   9 Dec 13 02:11 foldername4/
> 
> anonuid and anongid are set to 0, making them all appear as root, but I'm
> still able to read and write to them without being root

Allright that's anonuid, anongid that makes your user act if it was root on the fs.
This complicates things bit.
Comment 8 miranda 2024-01-15 05:17:15 UTC
Chiming in that I'm also impacted, issue still present on Plasma 6.0 RC1
Comment 9 Bug Janitor Service 2024-03-16 15:45:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1581
Comment 10 Méven 2024-03-17 10:19:58 UTC
Git commit a58005d0a4cb977b0311688536cd311ec0359c5b by Méven Car.
Committed on 17/03/2024 at 10:07.
Pushed by meven into branch 'master'.

KFileitem: Use internal permissions as best case scenario
Related: bug 483436

M  +3    -1    src/core/kfileitem.cpp

https://invent.kde.org/frameworks/kio/-/commit/a58005d0a4cb977b0311688536cd311ec0359c5b
Comment 11 Jessica M 2024-03-18 01:25:38 UTC
This is still broken after the recent KIO merge request, all files belonging to root on the NFS share still show greyed out options in dolphin, despite me technically being allowed to modify the files if I use CLI. Drag and dropping into the folder still works too, despite dolphin not letting me modify files in other ways. I also can't modify files owned by root if I use kio-admin, might be related.
Comment 12 Méven Car 2024-03-18 09:12:43 UTC
(In reply to Jessica M from comment #11)
> This is still broken after the recent KIO merge request, all files belonging
> to root on the NFS share still show greyed out options in dolphin, despite
> me technically being allowed to modify the files if I use CLI. Drag and
> dropping into the folder still works too, despite dolphin not letting me
> modify files in other ways. I also can't modify files owned by root if I use
> kio-admin, might be related.

Have you updated you KIO, i.e KDE Frameworks 6.1 ?
It should be released on April 13th, unless you have compiled yourself (or are using neon developer?) you couldn't have tested it.
Comment 13 Jessica M 2024-03-18 09:19:31 UTC
(In reply to Méven Car from comment #12)
> (In reply to Jessica M from comment #11)
> > This is still broken after the recent KIO merge request, all files belonging
> > to root on the NFS share still show greyed out options in dolphin, despite
> > me technically being allowed to modify the files if I use CLI. Drag and
> > dropping into the folder still works too, despite dolphin not letting me
> > modify files in other ways. I also can't modify files owned by root if I use
> > kio-admin, might be related.
> 
> Have you updated you KIO, i.e KDE Frameworks 6.1 ?
> It should be released on April 13th, unless you have compiled yourself (or
> are using neon developer?) you couldn't have tested it.

I compiled it from kio-git on the AUR
Comment 14 Méven Car 2024-03-20 09:21:33 UTC
(In reply to Jessica M from comment #13)
> (In reply to Méven Car from comment #12)
> > (In reply to Jessica M from comment #11)
> > > This is still broken after the recent KIO merge request, all files belonging
> > > to root on the NFS share still show greyed out options in dolphin, despite
> > > me technically being allowed to modify the files if I use CLI. Drag and
> > > dropping into the folder still works too, despite dolphin not letting me
> > > modify files in other ways. I also can't modify files owned by root if I use
> > > kio-admin, might be related.
> > 
> > Have you updated you KIO, i.e KDE Frameworks 6.1 ?
> > It should be released on April 13th, unless you have compiled yourself (or
> > are using neon developer?) you couldn't have tested it.
> 
> I compiled it from kio-git on the AUR

Nice, thanks.

The current code test the group permissions based on the file owner permissions which is wrong.
https://invent.kde.org/frameworks/kio/-/merge_requests/1583 is fixing it.
Comment 15 Méven Car 2024-03-25 18:29:30 UTC
(In reply to Méven Car from comment #14)
> (In reply to Jessica M from comment #13)
> > (In reply to Méven Car from comment #12)
> > > (In reply to Jessica M from comment #11)
> > > > This is still broken after the recent KIO merge request, all files belonging
> > > > to root on the NFS share still show greyed out options in dolphin, despite
> > > > me technically being allowed to modify the files if I use CLI. Drag and
> > > > dropping into the folder still works too, despite dolphin not letting me
> > > > modify files in other ways. I also can't modify files owned by root if I use
> > > > kio-admin, might be related.
> > > 
> > > Have you updated you KIO, i.e KDE Frameworks 6.1 ?
> > > It should be released on April 13th, unless you have compiled yourself (or
> > > are using neon developer?) you couldn't have tested it.
> > 
> > I compiled it from kio-git on the AUR
> 
> Nice, thanks.
> 
> The current code test the group permissions based on the file owner
> permissions which is wrong.
> https://invent.kde.org/frameworks/kio/-/merge_requests/1583 is fixing it.

Could you confirmed it is fixed with latest master ?
Comment 16 Jessica M 2024-03-26 20:11:46 UTC
(In reply to Méven Car from comment #15)
> (In reply to Méven Car from comment #14)
> > (In reply to Jessica M from comment #13)
> > > (In reply to Méven Car from comment #12)
> > > > (In reply to Jessica M from comment #11)
> > > > > This is still broken after the recent KIO merge request, all files belonging
> > > > > to root on the NFS share still show greyed out options in dolphin, despite
> > > > > me technically being allowed to modify the files if I use CLI. Drag and
> > > > > dropping into the folder still works too, despite dolphin not letting me
> > > > > modify files in other ways. I also can't modify files owned by root if I use
> > > > > kio-admin, might be related.
> > > > 
> > > > Have you updated you KIO, i.e KDE Frameworks 6.1 ?
> > > > It should be released on April 13th, unless you have compiled yourself (or
> > > > are using neon developer?) you couldn't have tested it.
> > > 
> > > I compiled it from kio-git on the AUR
> > 
> > Nice, thanks.
> > 
> > The current code test the group permissions based on the file owner
> > permissions which is wrong.
> > https://invent.kde.org/frameworks/kio/-/merge_requests/1583 is fixing it.
> 
> Could you confirmed it is fixed with latest master ?

Looks like it's fixed!