Code Monkey home page Code Monkey logo

Comments (1)

billziss-gh avatar billziss-gh commented on May 29, 2024 1

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].

from cgofuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.