Accessing a google cloud storage bucket from rstudo server hosed on a google VM with FUSE

Hi all,

I stood up an rstudio server on a google VM instance and it works well.
I also have a bucket on google cloud storage. (both in the same project)

I used gcsfuse to mount the bucket to my VM instance.

The bucket shows up as a folder, I can read and write files from my VM instance to the bucket via SSH. However when I go to
write.csv(df, '/path/to/bucket/test.csv')

I get a permission denied error.

I checked that I can read and write files from the user I created for my rstudio session (as well as from the root user). I also checked many different permission settings on the bucket.

Does anyone have some additional things I can do to trouble shoot this issue?

Many thanks,

Chuck

Figured it out

you need to run gcsfuse as the user who will be using the file system (my rstudio user), not as root. Similarly, the directory should be owned by that user. Do not use sudo for either of the steps above or you will wind up with permissions issues.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.