14

I have installed the Google Drive desktop app and it's available on Finder as a mounted drive, but I can't seem to access it from the terminal. For example, when I do cd 'Google Drive' I get a cd: Permission denied: 'Google Drive/' error. This happens even when I have some files stored locally.

Is there anyway to do this without explicitly downloading the entire Google Drive folder locally?

EDIT: cd /Volumes/GoogleDrive produces the same error.

2
  • Where is it mounted? Somewhere in /Volumes, I imagine. Commented Apr 12, 2022 at 17:17
  • Yes, but that produces the same error.
    – johnymm
    Commented Apr 12, 2022 at 19:47

2 Answers 2

18

On MacOS, Google Drive is setup as network volume.

When accessing Google Drive from terminal the first time:

cd ~/Google\ Drive

It should pop-up the following:

  • MacOS 12.x

    enter image description here

  • MacOS 13.3 and above

    enter image description here

Click OK and you should be able to access it normally.

If for whatever reason pop up not showing, then you have to go into System Preferences -> Privacy & Security, click on Files and Folders and add it manually:

  • MacOS 12.x

    enter image description here

    You need to select(check mark) Network Volumes.

  • MacOS 13.3 and above

    Picture is showing iTerm. Look for "Terminal" if you using MacOS default app.

    enter image description here

    In MacOS 13.x, it is changed to Google Drive.

    Actual location of ~/Google Drive is /Users/<username>/Library/CloudStorage/GoogleDrive-<gmail address>

6
  • Created account on apple.stackexchange just to say thank you. Very useful answer, I was not able to solve this problem.
    – 0x5C91
    Commented Sep 23, 2022 at 14:04
  • It doesn't work for me. I suspect that there have been additional restrictions since I am running Ventura (13.2.1). It isn't under /Volumes at all.
    – Kramer
    Commented Apr 3, 2023 at 20:25
  • @Kramer I updated the answer for MacOS 13.3
    – John Siu
    Commented Apr 5, 2023 at 10:14
  • @JohnSiu I appreciate you but I didn't get any popup at all. Thanks anyway.
    – Kramer
    Commented Apr 10, 2023 at 19:42
  • 1
    @Kramer Try go into System Settings -> Privacy & Security -> Files and Folders, look for "Terminal" and enable "Google Drive".
    – John Siu
    Commented Apr 11, 2023 at 18:29
2

Google Drive is found in /Volumes/GoogleDrive. Note the lack of the space character in the name. (I have two external drives: iTunes & TMBackup, which show up in the Volumes directory, naturally.)

enter image description here

7
  • 1
    Sorry, I should have mentioned that I tried there too. I get the same exact error when trying cd /Volumes/GoogleDrive
    – johnymm
    Commented Apr 12, 2022 at 19:46
  • 1
    As you can see from the permissions, you don't have access. As for how Google expects this to work, I can't say. I kicked Google Drive to the curb when they went to this loopback mount thing, removed the client and everything else, and went back to Dropbox. Commented Apr 12, 2022 at 19:50
  • Yes, but I don't know how to give myself permission (and it doesn't make sense since Finder has permission to access it). chmod doesn't seem to be working: says Operation not permitted. Dropbox is great, but unfortunately the free version limits you to 3 client installations.
    – johnymm
    Commented Apr 12, 2022 at 20:28
  • Finder is probably accessing it through whatever extension the application installed. Not really related, but I have no problem paying for things that actually work. I was paying for GD too, until they came up with this insane loopback mount concept that just broke things. Commented Apr 13, 2022 at 14:01
  • @MarcWilson Finder by default can access network volumes. You can check out my answer.
    – John Siu
    Commented Jun 19, 2022 at 7:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .