Skip to content


Subversion checkout URL

You can clone with
Download ZIP
FUSE filesystem over Google Drive

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.


  • Offline Google Documents access (read-only)
  • Duplicate file handling
  • Access to trash (.Trash directory)

Getting started


It's better to use the last CVS snapshot of ocamlfuse, because it contains some bugfixes. I've uploaded the snapshot on OASIS DB and added OASIS support, to ease compilation and installation. Note that you will need camlidl package installed in the default library path (because standard camlidl packages don't use findlib.)

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 a different configuration for each one.


This application is still to be tested thoroughly, so there are still 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

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 cleaning 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 (server side), you won't see it immediately in the mounted filesystem.

Note also that, at least for now, Google Documents will be exported read-only.


If you have questions, suggestions or want to report a problem, you can post to this mailing list. Or you may want to open an issue on github.

Something went wrong with that request. Please try again.