{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1017","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1017/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1017/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1017/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/issues/1017","id":121825066,"number":1017,"title":"ApiError: Insufficient Permission even when the same API wrote the file to Storage","user":{"login":"ajpyoung","id":707907,"avatar_url":"https://avatars.githubusercontent.com/u/707907?v=3","gravatar_id":"","url":"https://api.github.com/users/ajpyoung","html_url":"https://github.com/ajpyoung","followers_url":"https://api.github.com/users/ajpyoung/followers","following_url":"https://api.github.com/users/ajpyoung/following{/other_user}","gists_url":"https://api.github.com/users/ajpyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/ajpyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajpyoung/subscriptions","organizations_url":"https://api.github.com/users/ajpyoung/orgs","repos_url":"https://api.github.com/users/ajpyoung/repos","events_url":"https://api.github.com/users/ajpyoung/events{/privacy}","received_events_url":"https://api.github.com/users/ajpyoung/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/labels/storage","name":"storage","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-12T01:52:32Z","updated_at":"2015-12-14T19:13:27Z","closed_at":null,"body":"I'm at a loss here. My node code successfully uploaded files to gcloud Storage but can't seem to make the file public or even change the acl.\r\n\r\nThe error returned is\r\n```\r\n{ [ApiError: Insufficient Permission]\r\nerrors:\r\n [ { domain: 'global',\r\n     reason: 'insufficientPermissions',\r\n     message: 'Insufficient Permission' } ],\r\ncode: 403,\r\nmessage: 'Insufficient Permission',\r\nresponse: undefined }\r\n```\r\nHere's my code\r\n\r\n```javascript\r\nvar gcs = GLOBAL.gcloud.storage();\r\nvar bucket = gcs.bucket(GLOBAL.storage_names.products);\r\nvar file = bucket.file('images/'+targetValue+'_'+filename);\r\nstdout.pipe(file.createWriteStream())\r\n  .on('error', function(err) {\r\n    var msg = {\r\n      \"status\":\"Error\"\r\n      \"err\":err\r\n    };\r\n    console.log(msg);\r\n    \r\n  })\r\n  .on('finish', function() {\r\n    // The file upload is complete.\r\n    console.log(\"Successfully uploaded \"+targetValue+'_'+filename);\r\n    file.acl.add({\r\n      entity: 'allUsers',\r\n      role: gcs.acl.READER_ROLE\r\n    }, function(err, aclObject) {\r\n\r\n      if(err==null)\r\n      {\r\n        //stream upload file\r\n        file.makePublic();\r\n      }else{\r\n        console.log(\"ERROR in ACL Adding\");\r\n        console.log(err)\r\n      }\r\n      \r\n    });\r\n    file.makePublic(function(err, apiResponse) {\r\n      if(err==null)\r\n      {\r\n        console.log(\"File made public\");\r\n      }else{\r\n        console.log(\"make public error\");\r\n        console.log(err);\r\n      }\r\n    });\r\n  });\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/comments/164529927","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/issues/1017#issuecomment-164529927","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/1017","id":164529927,"user":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars.githubusercontent.com/u/723048?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T19:13:27Z","updated_at":"2015-12-14T19:13:27Z","body":"(Attaching the SO thread: http://stackoverflow.com/questions/34235381/gcloud-apierror-insufficient-permission-even-when-the-same-api-wrote-the-file-t)\r\n\r\n@jonparrott - any tips for this one?"}}