Skip to content


Subversion checkout URL

You can clone with
Download ZIP
FUSE filesystem over Google Drive
Pull request Compare This branch is 2 commits ahead, 189 commits behind master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

FUSE filesystem over Google Drive

google-drive-ocamlfuse is a FUSE filesystem backed by Google Drive, written in OCaml.

Getting started


Configuration and installation

To build the executable, run

$ ocaml -configure
$ ocaml -build

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

$ ocaml -install

To uninstall anything that was previously installed, execute

$ ocaml -uninstall


The first time, you can run google-drive-ocamlfuse without parameters:

$ google-drive-ocamlfuse

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 will let you modify default configuration before mounting the filesystem.

Then you can mount the filesystem:

$ google-drive-ocamlfuse mountpoint

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

$ google-drive-ocamlfuse -label label [mountpoint]

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


This application is still in early stage of development, so there are probably many bugs to discover and fix. So far, the filesystem is read-only, so it is safe to use, because it won't try to write to your Google Drive. If you have problems, you can turn on debug logging:

$ google-drive-ocamlfuse -debug mountpoint

In ~/.gdfuse/default you can find curl.log that will track every request to the Google Docs API, and gdfuse.log that will log filesystem operations and cache management. If something goes wrong, you can clean the cache, removing all the files in ~/.gdfuse/default/cache, to start from scratch (or you may remove everything in ~/.gdfuse/default to restart with default configuration and reauthorize the application).

Note that in order to reduce latency, the application will query the server and check for changes only every 60 seconds (configurable). So if you make a change to your documents, you won't see it immediately in the mounted filesystem.

Upgrading from 0.1pre2

Since version 0.1pre3, the application uses Drive API v2, instead of Google Documents List API v3, so if you are upgrading from previous versions, you should clean every file in ~/.gdfuse/default:

$ rm -rf ~/.gdfuse/default

because the access token requested previously is not compatible with the new API.

Something went wrong with that request. Please try again.