Code Monkey home page Code Monkey logo

hubfs's Introduction

WinFsp · Windows File System Proxy



WinFsp enables developers to write their own file systems (i.e. "Windows drives") as user mode programs and without any knowledge of Windows kernel programming. It is similar to FUSE (Filesystem in Userspace) for Linux and other UNIX-like computers.

winfsp.dev






Overview

WinFsp is a platform that provides development and runtime support for custom file systems on Windows computers. Typically any information or storage may be organized and presented as a file system via WinFsp, with the benefit being that the information can be accessed via the standand Windows file API’s by any Windows application.

The core WinFsp consists of a kernel mode file system driver (FSD) and a user mode DLL. The FSD interfaces with the Windows kernel and handles all interactions necessary to present itself as a file system driver. The DLL interfaces with the FSD and presents an API that can be used to handle file system functions. For example, when an application attempts to open a file, the file system receives an Open call with the necessary information.

Using WinFsp to build a file system has many benefits:

Easy development: Developing kernel mode file systems for Windows is a notoriously difficult task. WinFsp makes file system development relatively painless. This Tutorial explains how to build a file system.

Stability: Stable software without any known kernel mode crashes, resource leaks or similar problems. WinFsp owes this stability to its Design and its rigorous Testing Regime.

Correctness: Strives for file system correctness and compatibility with NTFS. For details see the Compatibility document.

Performance: Has excellent performance that rivals or exceeds that of NTFS in many file system scenarios. Read more about its Performance.

Wide support: Supports Windows 7 to Windows 11 and the x86, x64 and ARM64 architectures.

Flexible API: Includes Native, FUSE2, FUSE3 and .NET API's.

Shell integration: Provides facilities to integrate user mode file systems with the Windows shell. See the Service Architecture document.

Self-contained: Self-contained software without external dependencies.

Widely used: Used in many open-source and commercial applications with millions of installations (estimated: the WinFsp project does not track its users).

Flexible licensing: Available under the GPLv3 license with a special exception for Free/Libre and Open Source Software. A commercial license is also available. Please contact Bill Zissimopoulos <billziss at navimatics.com> for more details.

Installation

Download and run the WinFsp installer. In the installer select the option to install the "Developer" files. These include the MEMFS sample file system, but also header and library files that let you develop your own user-mode file system.

Launch a file system for testing

You can test WinFsp by launching MEMFS from the command line:

billziss@xps ⟩ ~ ⟩ net use X: \\memfs64\test
The command completed successfully.

billziss@xps ⟩ ~ ⟩ X:
billziss@xps ⟩ X:\ ⟩ echo "hello world" > hello.txt
billziss@xps ⟩ X:\ ⟩ dir


    Directory: X:\


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         6/12/2022   5:15 PM             28 hello.txt


billziss@xps ⟩ X:\ ⟩ type hello.txt
hello world
billziss@xps ⟩ X:\ ⟩ cd ~
billziss@xps ⟩ ~ ⟩ net use X: /delete
X: was deleted successfully.

MEMFS (and all file systems that use the WinFsp Launcher as documented in the Service Architecture document) can also be launched from Explorer using the "Map Network Drive" functionality.

Resources

Documentation:

Discussion:

hubfs's People

Contributors

billziss-gh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hubfs's Issues

What is the CLI invocation for HUBFS instead of NET USE?

Hello @billziss-gh ,

As an initial test, I installed the "HUBFS 2022 Beta1" (hubfs-win-1.0.22067.msi) and was able to connect to my Github Repo as it shows.

For a second step, I have been able to compile HUBFS in my MSYS2/Mingw x64 to produce the hubfs.exe file.

Now I would like to start up the hubfs.exe in a command prompt with the proper steps to connect to my repo again instead of using the "net use H: ..." command this time to validate that the build was successful.

Can you please show me the CLI options needed to make this work?

Basically, I would like to know what the CLI options that are being used when done with "net use".

Thanks

Cannot access private repo owned by different user or organization

I have a private repo on my account and orgs, shared with other users.

When I use HUBFS, (on Windows, installed with .msi, authenticated with "Preform GitHub Auth") I can access my private repos without any issue. All features that I've tested work as expected.

However, if I try to access a private repo owned by a different user or org, even if I'm the owner of the org, I cannot access them.

They also do not show up in the top level user's (or org's) folder(s).

If I try to go to the project's URL directly, I get a "Windows cannot access" error with code: 0x80004005 that looks identical to what you see when you access a nonexistent repo:
image

Device flow is disabled

When I try to run hubfs I get the following error

{23:39}~ ➭ hubfs /mnt
hubfs: client error: Device Flow must be explicitly enabled for this App (device_flow_disabled)

I suspect this is due to the recent github change which means that GitHub now requires device flow to be enabled for apps rather than having it enabled by default and the hubfs app does not yet have this enabled.

Update: a workaround in the meantime could be to use the -auth option to specify a different way of authenticating with GitHub. hubfs -auth optional /mnt, for example, doesn't give this error

Consider changing license to GPL

In this commit, WinFsp was changed from AGPL to GPL. I wonder if the same could be done for HUBFS. Many companies outright forbid the use of AGPL software in any capacity.

I think this is a very promising project, and I would like to contribute to it, but we cannot proceed with it under the AGPL.

Manually triggering commits?

I just found hubfs, and it seems promising to help people not normally using git... but I'm not sure it would work in my use-case, and I can't find any docs about it.

We are utilizing an old program that makes hundreds of data-files while operation are ongoing. All of these data-files are somehow linked together, and if just one of the data-files are not of the current version the program crashes. :-( If the program is shut down correctly, then we know all files are valid.

For this reason, I'm unsure if hubfs would be compatible with it, as I'm unsure about when exactly files are committed to the repository.

So my questions are:

  1. Are each change to a file triggering a commit of that file?
  2. If not, then are a number of file-changes within a time-period triggering a commit of those files?
  3. Would it be possible to somehow only trigger a commit of all changed files when we know it's safe to do so?

Thank you!

Drive is empty

Hi!

I've followed all the steps to setup HubFS

  • Authenticated using the browser
    image

  • Mounted the drive
    image

But I see nothing inside.

Using Windows 11 and the latest version of WinFsp.

Hubfs's keyring didn't work on Ubuntu 22.04

As the title, it keeps me reauthorized every time I run the command.
I found out that it doesn't rewrite the authentication key to the default key which is usually at ~/.local/share/keyrings (checked the timestamp, nothing changed)

Debug message does not contain any useful information in this case..
image

Are all of these fs types used in hubfs?

Hello,

I was looking at the HUBFS as it might be what I need to use to learn from as a template to build out the unionized ssh type filesystem and was reviewing the code in the src/fs section of hubfs.

https://github.com/winfsp/hubfs/tree/master/src/fs

What is interesting is that the hubfs seems to utilize:

memfs
nullfs
overlayfs
port
ptfs (passthrough)
unionfs

I was wondering if all of these are really used together.

Can you please elaborate more on how this works together since I would estimate that the "nullfs" is started initially until the user maps into github and then, just perhaps the unionfs is used to combine the different repositories that are under any given singe organization, or something along those lines.

Can you please help me understand the flow of things since as you know, I am interested in something similar, but to union mappings to different user accounts on separate ssh servers into a single R/W directory structure mounted.

Any information that you could provide would be greatly appreciated.

Happy Holidays and I look forward to hearing back from you.
Thanks

Changes to mounted repository are not kept

On:

  • Ubuntu 18.04

I've followed the instructions in the README and managed to mount a Github private repository , authorizing my Ubuntu PC via the one-time code.

I mount and then create / write top level files in the repo :

$ hubfs ~/mnt/
<... use one-time code and launch browser to authorize device aka PC ... >
$ # in another terminal ... :
$ cd ~/mnt/d-w-moore2/practice/master ; touch a ; vim README.md # make changes and save
$ cd ~ ; fusermount -u mnt

Then:

  • I do not notice Github in the browser showing any commits on master to reflect the touched a file and README.md changes.
  • re-mounting and cd'ing into the directory again, I can confirm the changes have not been saved

Improve explanation of changes

This seems like an interesting product but it would be great if the readme explained more of how changes are handled.
For example, if you change a file, is it then possible to commit that change?

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.