You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I pass -o ro to WinFsp then doesn't mark the file system as read only as it does on linux. I think libfuse passes unknown options on to mount.fuse which says in its man page
Most of the generic mount options described in mount are supported (ro, rw, suid, nosuid, dev, nodev, exec, noexec, atime, noatime, sync, async, dirsync).
This brings to mind 3 options
Should this be implemented by WinFsp?
Or is there a better more FUSE-y way of doing it? (I haven't discovered one in the docs)
Or alternatively I could just check for read only and return -EROFS in any methods which do writing?
What is your preferred option?
Thanks
The text was updated successfully, but these errors were encountered:
It is possible to mark a file system as read-only on WinFsp-FUSE by passing the (WinFsp specific) flag FSP_FUSE_CAP_READ_ONLY during fuse_operations::init. However I did not implement this flag on cgofuse. There are two reasons for this:
Read-only file systems on Windows and Linux behave differently. For example, Windows may still send a Write request on a file system that is marked read-only. [Please note that I am not 100% certain of this. I note however that the Windows CDROM file system driver, which is open-sourced, marks itself as read-only but also handles writes!]
I do not have good tests for read-only file systems. I did not want to have a situation along the lines of: "you said it's read-only so why am I getting writes".
Clearly this is an area where the WinFsp core could be improved (e.g. by rejecting write requests at the kernel level if the file system is marked read-only). Until that happens I recommend treating every file system as read-write and explicitly rejecting the requests that you do not want to handle with -EROFS.
[NOTE: The WinFsp-FUSE supported options are here and a few additional ones here].
If I pass
-o ro
to WinFsp then doesn't mark the file system as read only as it does on linux. I think libfuse passes unknown options on tomount.fuse
which says in its man pageThis brings to mind 3 options
-EROFS
in any methods which do writing?What is your preferred option?
Thanks
The text was updated successfully, but these errors were encountered: