Volver al ranking

astrada/google-drive-ocamlfuse

OCamlastrada.github.io/google-drive-ocamlfuse/

FUSE filesystem over Google Drive

google-driveocamlfusefilesystem
Crecimiento de estrellas
Estrellas
6k
Forks
369
Crecimiento semanal
Issues
279
2k4k
dic 2012jun 2017ene 2022jul 2026
README

FUSE filesystem over Google Drive

Join the chat at https://gitter.im/google-drive-ocamlfuse/Lobby Docker Pulls

google-drive-ocamlfuse is a FUSE filesystem for Google Drive, written in OCaml. It lets you mount your Google Drive on Linux.

Features (see what's new)

  • Full read/write access to ordinary files and folders
  • Read-only access to Google Docs, Sheets, and Slides (exported to configurable formats)
  • Multiple account support
  • Duplicate file handling
  • Access to trash (.Trash directory)
  • Unix permissions and ownership
  • Symbolic links
  • Read-ahead buffers when streaming
  • Accessing content shared with you (requires configuration)
  • Team Drive Support
  • Service Account Support
  • OAuth2 for Devices Support
  • Since version 0.8.0, the process is kept in foreground (breaking change)
  • Since version 0.8.0, the new configuration file format is TOML (breaking change)

Resources

  • Homepage
  • Wiki: includes installation instructions, and more details about configuration, and authorization

Authorization

Please be sure to have a look at the authorization page, to understand how the authorization process works, and to discover all the available options.

Getting started

Installation

I've uploaded .deb packages for Ubuntu to my PPA. In order to to install it, use the commands below:

sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

New beta versions are available on this PPA. If you want to test them, use the commands below:

sudo add-apt-repository ppa:alessandro-strada/google-drive-ocamlfuse-beta
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

For other installation options, please refer to the wiki.

How to build

Requirements

Configuration and installation

To build the executable, run

dune build @install

To install it, run (as root, if your user doesn't have enough privileges)

dune install

To uninstall anything that was previously installed, execute

dune uninstall

Usage

First, you must set up OAuth 2.0:

  1. Activate the Google Drive API.
  2. Create an OAuth client ID.
  3. Choose Desktop as Application type.
  4. Set the Name to anything you like.

This way you will get a Client ID and Client secret that you can use to access your Drive. To authorize google-drive-ocamlfuse, pass the client ID and the client secret on the command line, e.g.:

google-drive-ocamlfuse -id xxxxxxxxxx.apps.googleusercontent.com -secret XXX-YYY-ZZZ

This command will create the default application directory (~/.gdfuse/default), containing the configuration file config (see the wiki page for more details about configuration). And it will start a web browser to obtain authorization to access your Google Drive. This way, you can modify the default configuration before mounting the filesystem.

Then, you can choose a local directory to mount your Google Drive (e.g.: ~/GoogleDrive).

Create the mount point, if it doesn't exists:

mkdir ~/GoogleDrive

Then, you can mount the filesystem (append & to the command, if you want to run it in background):

google-drive-ocamlfuse ~/GoogleDrive &

If you have more than one account, you can run:

google-drive-ocamlfuse -label [label] ~/GoogleDrive &

Using label to distinguish different accounts. The program will use the directory ~/.gdfuse/[label] to host the configuration, the application state, and the file cache. No file is shared among different accounts, so you can have a different configuration for each one.

To unmount the filesystem, issue this command:

fusermount3 -u ~/GoogleDrive

On distributions that still provide the older helper name, use fusermount -u ~/GoogleDrive instead.

Troubleshooting

This application is still under testing, so there are probably bugs to discover and fix. To be extra sure, if you want, you can mount the filesystem in read-only mode, modifying the configuration (see the documentation), to avoid any write attempt to the server. Anyway, the rm command will simply trash your file, so you should always be able to rollback any changes. If you have problems, you can turn on debug logging:

google-drive-ocamlfuse -debug mountpoint

The process is always kept in foreground; -debug enables debug and verbose logging.

In ~/.gdfuse/default you can find curl.log that will track every request to the Google Drive API, and gdfuse.log that will log FUSE operations and cache management. If something goes wrong, you can try clearing the cache, with this command:

google-drive-ocamlfuse -cc

If something still doesn't work, try starting from scratch removing everything in ~/.gdfuse/default. In this case you will need to reauthorize the application.

Note that in order to reduce latency, cached metadata remains valid for 60 seconds by default (configurable). After it expires, the next normal resource operation checks the server for changes. So, if you make a change to your documents (server side), you won't see it immediately in the mounted filesystem. Filesystem-capacity queries such as df use the latest in-memory quota snapshot without contacting Drive; they may report stale values, or unlimited capacity before the first snapshot is available.

Note also that Google Documents will be exported read-only.

Support

If you have questions, suggestions or want to report a problem, you may want to open an issue on github.

Repositorios relacionados
rclone/rclone

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

GoGo ModulesMIT Licensegolanggo
rclone.org
58.6k5.2k
googleworkspace/cli

Google Workspace CLI — one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Dynamically built from Google Discovery Service. Includes AI agent skills.

Rustcrates.ioApache License 2.0google-workspaceagent-skills
developers.google.com/workspace
29.9k1.7k
benweet/stackedit

In-browser Markdown editor

JavaScriptnpmApache License 2.0markdowneditor
stackedit.io
23k2.8k
wkentaro/gdown

Google Drive public file downloader when curl/wget fails.

PythonPyPIMIT Licensegoogle-drivewget
5.3k422
iterate-ch/cyberduck

Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.

JavaMavenGNU General Public License v3.0webdavsftp
cyberduck.io
4.6k359
stewartmcgown/uds

📀 Unlimited Google Drive Storage by splitting binary files into base64

PythonPyPIGNU Affero General Public License v3.0google-driveunlimited
4.4k274
GAM-team/GAM

command line management for Google Workspace

PythonPyPIApache License 2.0googlegsuite
github.com/GAM-team/GAM/wiki
4.2k530
anasty17/mirror-leech-telegram-bot

Official Repository: Telegram bot which can download direct links, torrents, nzb, google drive, telegram document, any file/folder from rclone supported clouds, all yt-dlp supported sites and jdownloader supported sites, then upload them to google drive, telegram cloud or to one of rclone supported clouds

PythonPyPIGNU General Public License v3.0mirrorleech
t.me/mltb_official_channel
4.2k5.1k
sabeechen/hassio-google-drive-backup

Automatically create and sync Home Assistant backups into Google Drive

PythonPyPIMIT Licensehome-assistantgoogle-drive
3.6k212
P3TERX/aria2.conf

Aria2 配置文件 | OneDrive & Google Drvive 离线下载 | 百度网盘转存

ShellMIT Licensearia2aria2-config
p3terx.com/archives/aria2_perfect_config.html
3.4k724
tobychui/arozos

Web Desktop Operating System for low power platforms, Now written in Go!

JavaScriptnpmGNU General Public License v3.0aroz-onlinegolang
os.aroz.org
2.9k215
taylorwilsdon/google_workspace_mcp

Control Gmail, Google Calendar, Docs, Sheets, Slides, Chat, Forms, Tasks, Search & Drive with AI - Comprehensive Google Workspace / G Suite MCP Server & CLI Tool

PythonPyPIMIT Licenseaigmail
workspacemcp.com
2.9k889