New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FUSE API] Cannot make entries in the file system show as read-only #517
Comments
What are you setting the umask as? Off the top of my head I recommend something like |
Preferably I wouldn't want to set the umask at all, but rather see the permission bits reported by In any case, setting e.g. |
You do not need to use the I am not sure what In a nutshell, WinFsp does not currently properly support read-only file systems. You can advertise a file system as read-only, but you may have to return "access denied" ( Finally you may have to add some special handling to your file system to recognize the |
Sorry, I must have completely missed your reply.
This is exactly what my file system is doing when the |
Here's the output of
I assume the |
Bug Report
I didn't add this to #84 as it think it's a distinct problem.
I don't seem to be able to make any entries in a FUSE file system over WinFsp appear as read-only. It's absolutely possible that I'm just doing it wrong, but I have a hard time figuring out what's going on.
I'm going to compare Linux and Windows/WinFsp again.
How to Reproduce
First of all, I'm checking whether
stat
correctly reports read-onlyness:So that seems to work. Now, while my file system is inherently read-only, permissions of the files are fully preserved and they will show up as writable. This ensures you can do things like
rsync
from the file system and get the original permissions back. However, I can explicitly pass areadonly
option to the FUSE driver, which will cause all write permission bits to be stripped from the file status retrieved bygetattr
.Now, here's what happens on Linux:
On Windows, no matter what is being returned by
getattr
, the status looks like this:Also, no matter what I pass to
-oumask
, the outcome doesn't change (though I don't really know if passing this option actually works, see #516).Behaviors
I'd expect files without any write permissions to show up as read-only.
Environment
The text was updated successfully, but these errors were encountered: