github.com/adrianjagielak/goofys@v0.24.1-0.20230810095418-94919a5d2254/README-gcs.md (about) 1 # Google Cloud Storage (GCS) 2 3 4 ## Prerequisite 5 6 Service Account credentials or user authentication. Ensure that either the service account or user has the proper permissions to the Bucket / Object under GCS. 7 8 To have a successful mount, we require users to have object listing (`storage.objects.list`) permission to the bucket. 9 10 ### Service Account credentials 11 12 Create a service account credentials (https://cloud.google.com/iam/docs/creating-managing-service-accounts) and generate the JSON credentials file. 13 14 ### User Authentication and `gcloud` Default Authentication 15 User can authenticate to gcloud's default environment by first installing cloud sdk (https://cloud.google.com/sdk/) and running `gcloud auth application-default login` command. 16 17 18 ## Using Goofys for GCS 19 20 ### With service account credentials file 21 ``` 22 GOOGLE_APPLICATION_CREDENTIALS="/path/to/creds.json" goofys gs://[BUCKET] /path/to/mount 23 ``` 24 25 ### With user authentication (`gcloud auth application-default login`) 26 27 ``` 28 goofys gs://[BUCKET] [MOUNT DIRECTORY] 29 ```