I'm using gcsfuse inside Google Compute Engine. I mounted a folder with cloud storage bucket but, unable to create any file inside of it:

touch t1

with an error:

touch: cannot touch 't1': Input/output error

Solution for the issue is to give Cloud API access scope: storage : read/write

How to Change Cloud API access scopes on GCP Compute Engine with out stopping the Instance? Please provide me the solution for this iisue.

Thanks in advance!

1 Answer 1


It looks like you have insufficient GCS permissions. Have a look at the documentation for gcsfuse. If you're using a service account on a GCE VM make sure to set up the VM with the storage-full access scope.

You can try to fix it in this way:

  1. create a service account (more information here)
  2. create a key for the service account, and download the .json file
  3. grant an appropriate role to the service account
  4. grant the appropriate permissions to the service account on the bucket
  5. upload the .json credentials for the service account to the VM
  6. define an environment variable that contains the path to the service account credentials when calling gcsfuse from the command line:

    GOOGLE_APPLICATION_CREDENTIALS = /root/credentials/service_credential_file.json gcsfuse bucket_name /my/mount/point

    use the key_file option to accomplish the same goal in fstab as it documented here.

In addition, you need to use the environment variable or key_file option even if you have configured the service account on the VM using:

gcloud auth activate-service-account --key-file /root/credentials/service_credential_file.json

Please update your question with your steps, commands and full outputs if you still have a problem.

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.