ResumableUploadAbortException: 403 Insufficient Permission

superuserdo picture superuserdo · Feb 19, 2015 · Viewed 15k times · Source

I am using Google Cloud Storage and Google Compute Engine and am trying to upload to my bucket from my VM. My bucket has read/write permissions and so does anyone that has access to it. They are labeled as Owner. I can download from my bucket fine. When I try to upload to my bucket, this is the error I get. ResumableUploadAbortException: 403 Insufficient Permission . I am unsure as to why this is the case? Any clues?

Answer

Daniel Golden picture Daniel Golden · Jan 12, 2017

Change the Cloud API access scope of the VM to allow read/write on Storage. This is in the "Access scopes" section of the VM settings. Your VM needs to be stopped to do this.

0. Stop VM instance
1. Open VM instance details
2. Press "Edit"
3. Change Cloud API access scope--> "Allow full access to all cloud APIs"

....

https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#changeserviceaccountandscopes

IMPORTANT!! Note per this comment on a related post that you may need to delete the credentials in ~/.gsutil after definint the new scope.

# VM instance console
sudo rm -r ~/.gsutil