All Projects → mk-fg → Onedrive Fuse Fs

mk-fg / Onedrive Fuse Fs

Licence: wtfpl
Script to mount Microsoft OneDrive (formerly known as SkyDrive) folder as a FUSE filesystem

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Onedrive Fuse Fs

Onedriver
A native Linux filesystem for Microsoft OneDrive
Stars: ✭ 163 (+139.71%)
Mutual labels:  fuse, onedrive, filesystem
Securefs
Filesystem in userspace (FUSE) with transparent authenticated encryption
Stars: ✭ 518 (+661.76%)
Mutual labels:  fuse, filesystem
Google Drive Ocamlfuse
FUSE filesystem over Google Drive
Stars: ✭ 4,447 (+6439.71%)
Mutual labels:  fuse, filesystem
Dbxfs
User-space file system for Dropbox
Stars: ✭ 673 (+889.71%)
Mutual labels:  fuse, filesystem
Svfs
The Swift Virtual File System
Stars: ✭ 375 (+451.47%)
Mutual labels:  fuse, filesystem
Dokany
User mode file system library for windows with FUSE Wrapper
Stars: ✭ 4,055 (+5863.24%)
Mutual labels:  fuse, filesystem
S3fs Fuse
FUSE-based file system backed by Amazon S3
Stars: ✭ 5,733 (+8330.88%)
Mutual labels:  fuse, filesystem
Btfs
A bittorrent filesystem based on FUSE.
Stars: ✭ 2,984 (+4288.24%)
Mutual labels:  fuse, filesystem
Distribyted
📂 ➡️ 📺 🎶 🎮 Torrent client with on-demand file downloading as a filesystem.
Stars: ✭ 791 (+1063.24%)
Mutual labels:  fuse, filesystem
Fuse Ts
Stars: ✭ 6 (-91.18%)
Mutual labels:  fuse, filesystem
Fuse Copyfs
CopyFS is the copy-on-write (COW) versioned filesystem for FUSE. Years ago I added features to CopyFS 1.0, then 1.0.1 came out and I never bothered to forward-port my changes. Now I have. Master is 1.3.1M, which is CopyFS 1.0.1 + 1.3M
Stars: ✭ 24 (-64.71%)
Mutual labels:  fuse, filesystem
Infinit
The Infinit policy-based software-defined storage platform.
Stars: ✭ 363 (+433.82%)
Mutual labels:  fuse, filesystem
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+5682.35%)
Mutual labels:  fuse, filesystem
Catfs
Cache AnyThing filesystem written in Rust
Stars: ✭ 404 (+494.12%)
Mutual labels:  fuse, filesystem
Winfsp
Windows File System Proxy - FUSE for Windows
Stars: ✭ 4,071 (+5886.76%)
Mutual labels:  fuse, filesystem
Exfat
Free exFAT file system implementation
Stars: ✭ 528 (+676.47%)
Mutual labels:  fuse, filesystem
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (+1407.35%)
Mutual labels:  fuse, filesystem
redis-fs
Mount a Redis database as a filesystem using fuse.
Stars: ✭ 76 (+11.76%)
Mutual labels:  fuse, filesystem
Jnr Fuse
FUSE implementation in Java using Java Native Runtime (JNR)
Stars: ✭ 266 (+291.18%)
Mutual labels:  fuse, filesystem
Fuse Rs
Rust library for filesystems in userspace (FUSE)
Stars: ✭ 735 (+980.88%)
Mutual labels:  fuse, filesystem

onedrive-fuse-fs

Deprecation Warning: this script uses obsolete python-onedrive module for old OneDrive API, and unlikely to ever be rewritten for new API, so it might be a good idea to use something else more future-proof for new projects, if there are other options available.

Script to mount Microsoft OneDrive (formerly known as SkyDrive) folder as a FUSE filesystem.

This module is single-threaded and tries to do all operations as synchronously as possible - i.e. operations do not return until they're sequentially performed through the OneDrive API, with the exception of metadata caches and any fuse/kernel caches.

That, lots of limitations, and the fact that API calls over https tend to be quite slow and frequent even with a keepalive connections, make it unsuitable for use as a general-purpose fs.

Main purpose of such abstraction is a convenient browsing (in shell or any general-purpose file manager), transfer or synchronization of files with simple unix tools like "ls", "cp" or "rsync".

Also, whole script was one-evening project to see if it'd work, and haven't been touched in like 3 years now (2015), so can be improved a lot (wrt performance, caching, handling odd cases, updated to use new api, etc), but apparently still works, just don't expect a lot from it.

Service was called SkyDrive prior to 2014-02-19, when it got renamed to OneDrive. This repo was similarly renamed from skydrive-fuse-fs to onedrive-fuse-fs.

Limitations

OneDrive is not a filesystem (and in fact, basically a key-value storage), and doesn't expose anything resembling a posix fs interface (at least in old API that python-onedrive module uses), so lots of limitations apply.

By default (with "api_cache" option), module aggressively caches some data (but not as much as possible) to avoid time-consuming https requests, so any changes performed on OneDrive outside of the script, might be invisible until remount or cache expiration / invalidation.

Even with api_cache disabled, lots of operations will still have a race conditions in them. For example, rename operation has to perform 4-6 API calls to check source and destination paths, whether it's a file/folder metadata update or a "move" operation, etc, and if something happens with remote paths between these checks, operation may fail with unpredictable results.

Rename operations are not atomic if destination path exists and is a file.

Write and truncate operations are performed by downloading the whole file, modifying it locally, uploading file back under temporary name, deleting the original file and renaming uploaded file to original name.

Not all potential API errors are translated into errno's (and probably not all of them can be mapped to these at all), and might manifest as EFAULT ("Bad Address") errors. Use "--debug" option to see which API calls might result in these - all fuse-requested operations and resulting API requests are logged there.

uid/gid/mode can potentially be stored in object metadata, but that is not implemented, and I don't see much point in it.

Usage

Requires python-onedrive module installed, use any of these lines:

pip install 'python-onedrive[conf]'   # system-wide by default, probably needs root
pip install --user 'python-onedrive[conf]'   # unprivileged install to ~/
easy_install python-onedrive PyYAML   # try to avoid that one

("python-onedrive[conf]" installs python-onedrive + PyYAML, latter being is a requirement for configuration-file handling in python-onedrive; install it in a similar way if you're using python setup.py install or some older packaging tools)

Before using this module, configuraton file with authentication data must be created, as described in python-onedrive documentation here.

Usage from checkout (no installation - apart from aforementioned module(s) - necessary), can be run from unprivileged user:

% ./onedrivefs /mnt/onedrive

Install to system-wide $PATH (might need system-wide fusepy module as well):

# pip install fusepy
# install -m755 onedrivefs /usr/local/sbin/

Use from $PATH with mount command:

# mount -t fuse.onedrivefs ~/.lcrc /mnt/onedrive

Examples with fstab(5) syntax (any one of these will do):

/var/lib/onedrive.yaml /mnt/onedrive fuse.onedrivefs defaults 0 0
/var/lib/onedrive.yaml /mnt/onedrive fuse.onedrivefs allow_other
/home/myuser/.lcrc /home/myuser/clouds/OneDrive fuse.onedrivefs user=myuser
/var/lib/onedrive.yaml:Pics /mnt/onedrive fuse.onedrivefs defaults

Available mount options can be found in onedrivefs --help output (onedrive-specific) and man mount.fuse (more general fuse options).

Latter fstab example line mounts "Pics" OneDrive folder instead of root. "subdir" fuse module can be also used to the same effect.

Make sure configuration file (/var/lib/onedrive.yaml in fstab examples above) is not accessible to anyone but root (or a dedicated user), and is writable - refreshed access tokens will be stored there.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].