I've followed these instructions to use google-drive-ocamlfuse to mount Google Drive folders on a headless server

But I've encountered an issue, unless I run the command to mount my ~/drive folder as root (via sudo) it throws an error.

(precise)lukes@localhost:~$ google-drive-ocamlfuse -label me ~/drive
/fuse: failed to exec fusermount: No such file or directory

So I figured I'd require root privileges and ran sudo google-drive-ocamlfuse -label me /home/lukes/drive

(precise)lukes@localhost:~$ sudo google-drive-ocamlfuse -label me /home/lukes/drive/
[sudo] password for lukes: 
(precise)lukes@localhost:~$ ls -l
ls: cannot access drive: Permission denied
total 4
drwx--x--- 3 lukes 1001 4096 May 24 17:00 Downloads
d????????? ? ?     ?       ?            ? drive

Huh? thats a wierd looking output from ls, so I figured because I mounted it as root I need to run sudo ls -l

(precise)lukes@localhost:~$ sudo ls -l
total 8
drwx--x--- 3 lukes  1001 4096 May 24 17:00 Downloads
drwxrwxr-x 2 lukes lukes 4096 May 24 18:29 drive

So the drive folder is owned correctly. Not sure what I can do to fix the fact I can't cd into it.

N.B. I can sudo su and then cd drive && ls no problems, but I can't edit any of the files that are in my Google Drive folder, which defeats the point of having mounted them in the first place.


When you mount a FUSE filesystem, by default, only the user doing the mounting can access it. You can override this by adding the allow_other mount option, but this is a security risk if the filesystem wasn't designed for it (and most filesystems accessed via FUSE aren't): what are the file permissions going to allow other users to do? Furthermore only root can use allow_other, unless explicitly authorized by root.

Anyway, you should do the mounting as your ordinary user, not as root. FUSE is designed to be used as an ordinary user. Depending on your distribution and how your system is configured, you may need to be in the fuse group. Check the permissions on /dev/fuse: you can use FUSE iff you have read-write access to it.

Anyway, the error you got doesn't indicate a permission problem. The command fusermount should be in /bin or /usr/bin, on every user's $PATH. If you don't have it, the most likely explanation is that you need to install it. For example, on Debian/Ubuntu/…, install the fuse package.

  • 1
    fuse package was missing. I guess maybe the application google-drive-ocaml implemention trys some other mount method if run as root, hence the wierd partial mounting issue. – Luke May 24 '15 at 22:49
  • 1
    @Luke As root, it falls back to mount -o fuse. fusermount is essentially a wrapper for mount -o fuse that makes some security checks. – Gilles May 24 '15 at 22:50
  • @Gillles thanks for clearing that up, I know have full front end tooling (node, npm, gulp, bower and git) on my chromebook whilst I'm able to load the project in the ChromeOS Developer Environment to make edits. Literally saved me from spending a fortune on a dev laptop – Luke May 24 '15 at 22:55
  • @Luke I noticed that ocamlfuse did not install fusermount as you suggested - I reinstalled fuse from tarball and it worked after, thanks! – Jeff Clayton Feb 10 '16 at 20:02

It looks like the actual answer is missing, so I'll share.

The reason you get:

d????????? ? ?     ?       ?            ? drive

...is because your credentials don't match. The mount is made (try mounting twice for an error), but that is it. The log (~/.gdfuse/<*label*>/gdfuse.log) will give you only the faintest hint.

All you need to do is make sure your credentials at https://console.developers.google.com match what is in ~/.gdrive/<*label*>/config

Mine changed on me on their own, and when I put the current ones in config, things worked.

  • @StephenRauch, thanks for the correction. I'm a little confused, though, about what the asterisks add? I was trying to follow 'normal' syntax for a <required> element vs. an [optional] one. TIA for explaining. :) – Gabe the Server Apr 14 '17 at 16:11
  • We call those edits, not corrections. All I added was some backticks, which cause the enclosed test to look like: this. They can often make things easier to read by highlighting fixed formatted information – Stephen Rauch Apr 14 '17 at 16:14
  • This answer is not always correct. You can get question marks instead of permissions, user, group, etc. if it is fuse-mounted by another user. – Ankor Nov 3 '18 at 12:39

I went into ~/.gdfuse/default and renamed "state" to "state.old". Running google-drive-ocamlfuse again went though the whole authentication and token fetching process and all is well now. -- tim

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.