Bug 387936 - NFSv4 mount is incorrectly marked as read-only
Summary: NFSv4 mount is incorrectly marked as read-only
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 400293 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-15 14:14 UTC by gbillios
Modified: 2021-02-08 16:08 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gbillios 2017-12-15 14:14:44 UTC
Using dolphin 17.08.3-1 package on Arch. 

I've mounted an NFS share v3 and while I can write on the root dir from terminal with my user I can't write from Dolphin, get no options to create new file or past any files from Dolphin. 

Tried the same thing from Debian 9 with Dolphin 16.08.3 and it works fine there. 

not sure how to troubleshoot further, running Dolphin from terminal gives no specific error and I see nothing relevant on journal logs.
Comment 1 Wolfgang Wallner 2017-12-17 18:57:34 UTC
I can confirm this bug on Kubuntu 17.10, using Dolphin 17.04.3.

I have a folder mounted via NFS, and I can read its contents in Dolphin, but can't create/modify/delete anything (e.g. the context menu for Create New is grayed out).
It works from the command line, and I can also save files to this folder from other progams.
However, Nautilus shows similar behavior as Dolphin.

Detailed description:
I have a Synology NAS, and mount some of the shared folders via NFS.
Mounting the NAS folder /volume1/homes shows this bug, while e.g. accessing /volume1/video via NFS and Dolphin works fine.

The Synology NAS only accepts NFSv3 for /volume1/homes, but I do not know why.
Mounting the video folder with NFSv3 and NFSv4 works fine.

Permissions for the individual folders:
ls -ld / /mnt/ /mnt/DS216/ /mnt/DS216/homes/ /mnt/DS216/homes/woife /mnt/DS216/Video
drwxr-xr-x 24 root  root  4096 Dez  8 15:55 /
drwxr-xr-x  9 root  root  4096 Dez 17 13:12 /mnt/
drwxr-xr-x  4 root  root     0 Dez 17 19:36 /mnt/DS216/
drwxr-xr-x 10 root  root  4096 Dez  5 21:53 /mnt/DS216/homes/
drwx------ 10 woife users 4096 Dez 17 19:16 /mnt/DS216/homes/woife
drwxrwxrwx  8 root  root  4096 Dez 17 19:12 /mnt/DS216/Video

It does not matter if I mount the folder via autofs or manually.
The only option I pass via autofs is "-rw".
Comment 2 Wolfgang Wallner 2017-12-18 18:20:58 UTC
> The Synology NAS only accepts NFSv3 for /volume1/homes, but I do not know why.
Mounting the folder with NFSv4 works now, again I don't know why.

However, the behavior with NFSv3 and NFSv4 is the same.
Comment 3 gbillios 2018-03-17 19:15:21 UTC
haven't seen any actions since 3 months now, if there is a way to provide more info please tell me how. 

this is still valid in version 17.12.3 of dolphin
Comment 4 Tore Anderson 2018-07-04 12:14:41 UTC
Confirmed. Same issue on Fedora 28 with dolphin-17.12.2-2.fc28.x86_64. It seems to believe a NFSv4 mount is read-only. (It isn't.)
Comment 5 Nate Graham 2018-07-04 12:17:06 UTC
Thanks for the new info. Can you provide details about your method of mounting it so we can try to figure out what combination of options triggers this bug?
Comment 6 Tore Anderson 2018-07-04 12:24:47 UTC
(In reply to Nate Graham from comment #5)
> Thanks for the new info. Can you provide details about your method of
> mounting it so we can try to figure out what combination of options triggers
> this bug?

Standard mounting from /etc/fstab:

nas2-osl1:/volume1/homes/@LH-REDPILL-LINPRO.COM/0/tore-7097 /nfshome nfs defaults 0 0

The resulting /proc/mounts entry:

nas2-osl1:/volume1/homes/@LH-REDPILL-LINPRO.COM/0/tore-7097 /nfshome nfs4 rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=2a02:c0:(snip),local_lock=none,addr=2a02:c0:(snip) 0 0

The mount is writable just fine from other applications, such as the shell:

$ stat /nfshome
  File: /nfshome
  Size: 6654            Blocks: 0          IO Block: 32768  directory
Device: 38h/56d Inode: 4727201     Links: 1
Access: (0755/drwxr-xr-x)  Uid: ( 7097/    tore)   Gid: ( 7097/    tore)
Context: system_u:object_r:nfs_t:s0
Access: 2018-07-04 14:16:34.555886284 +0200
Modify: 2018-07-04 14:16:33.518885060 +0200
Change: 2018-07-04 14:16:33.518885060 +0200
 Birth: -
$ touch /nfshome/test
$ rm /nfshome/test
$ 

I believe the NFS server is a Synology RackStation RS3617xs.

Tore
Comment 7 Tore Anderson 2018-07-04 12:36:02 UTC
Noticed something interesting now:

$ test -w /nfshome && echo rw || echo ro
ro
$ test -w /nfshome/bin && echo rw || echo ro
rw

This seems to match Dolphin's behaviour. I can use Dolphin to manage files inside subdirectories just fine, just not at the top-level mount point. But even though "test -w" suggests otherwise, the top-level mount point is writeable just fine. Curious.
Comment 8 gbillios 2018-09-01 08:17:53 UTC
Seems like with dolphin 18.08.0-1 (arch version) I can create folders just fine on the root dir. 

If anyone else also can confirm then I'll mark this from my side as resolved.
Comment 9 Nate Graham 2018-09-01 14:47:01 UTC
Can confirm. Looks like something fixed this, yay.
Comment 10 Jonathan Marten 2021-02-08 16:08:54 UTC
*** Bug 400293 has been marked as a duplicate of this bug. ***