Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/biont/files_fuse_mount
Nextcloud app to expose user storage as a FUSE filesystem managed by the filesystem API
https://github.com/biont/files_fuse_mount
fuse fuse-filesystem nextcloud
Last synced: about 2 months ago
JSON representation
Nextcloud app to expose user storage as a FUSE filesystem managed by the filesystem API
- Host: GitHub
- URL: https://github.com/biont/files_fuse_mount
- Owner: Biont
- Created: 2021-12-07T15:18:37.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T02:57:48.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T03:52:39.497Z (2 months ago)
- Topics: fuse, fuse-filesystem, nextcloud
- Language: PHP
- Homepage:
- Size: 347 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Files FUSE Mount
[![Test](https://github.com/Biont/files_fuse_mount/actions/workflows/test.yaml/badge.svg)](https://github.com/Biont/files_fuse_mount/actions/workflows/test.yaml)Expose a user's Nextcloud storage as a filesystem. Every reading & writing operation in this filesystem is controlled by Nextcloud and its filesystem API.
This has some key benefits over direct filesystem access:* Shares are working
* Flows are properly triggered
* No rescan of file changes required## Use cases:
* Create a pool of shared media with colleagues and family. Then mount the whole library in some external media player like Jellyfin
* Expose a user's storage as a Samba share without worrying about consistency with Nextcloud.
* Replace an existing WebDAV mount. Benchmarks are needed, but chances are this solution here will perform a LOT better
* Use powerful third-party server tools for processing and organizing data and see changes immediately reflected in Nextcloud## Requirements
* Your system needs to be set up for mounting FUSE filesystems: You need the have `libfuse-dev` and `fuse` installed.
* You need PHP 7.4+ with `ext-ffi`## Usage
This app has no GUI and probably won't ever need one. For now, it just ships a new CLI command called `files:fuse-mount`. It supports specifying one or more users and a mount point.
For example, to mount a single user directory, run
`./occ files:fuse-mount --user john /mnt/nextcloud-fuse/john`You can also pass multiple users. In this case the root of the mount point will contain all individual user folders as subdirectories
`./occ files:fuse-mount -u john -u jane /mnt/nextcloud-fuse/john`The command will stay in the foreground as long as the mount is active. To unmount and terminate the process, use `fusermount -u `
## Caveats
This a very very rudimentary implementation. It currently supports:
* Directory listing
* Read operations
* Write operations
* File deletionSo there is a lot of stuff missing that you might expect:
* Polling (Might need to look into PHP8.1 Fibers for this one)
* Symlinks (A limited implementation that enables sharing between users could work. Otherwise it just does not make sense to support symlinks)
* Integration of common linux concepts like ownership/permissions and locking (where possible, correlating Nextcloud concepts are applied though)# Troubleshooting
*Failed loading 'libfuse.so'*
Make sure your system has the required packages. On Debian for example, you need `fuse` and `libfuse-dev`*`/dev/fuse` not found!*
[Check that your user has acces to that file](https://superuser.com/questions/466304/how-do-i-make-sshfs-work-in-debian-i-get-dev-fuse-permission-denied)
If you're seeing the error inside a container, ensure that you are passing the `/dev/fuse` device into it