gcloud project owner permission denied
Asked Answered
D

3

6

So I'm trying to run a training job on google cloud's AI-platform for an image classifier written in tensorflow by the command line:

gcloud ai-platform jobs submit training my_job \
          --module-name trainer.final_task \
          --staging-bucket gs://project_bucket \
          --package-path trainer/ \

but I keep getting the ERROR: (gcloud.ai-platform.jobs.submit.training) User [[email protected]] does not have permission to access project [my_project] (or it may not exist): Permission denied on 'locations/value' (or it may not exist).

I don't get how this is possible as I own the project on gcloud (with that e-mail address) and am even expressly linked to it on the IAM policy bindings. Has anyone experienced this before?

EXTRA INFO:

  • I am using gcloud as an individual, there are no organisations involved. Hence the only members linked in IAM policy bindings are me and gcloud service accounts.

  • The code works perfectly when trained locally (using gcloud ai-platform local train) with the same parameters.

Denby answered 19/12, 2019 at 8:50 Comment(2)
Are you in an organisation with some policies applied? Are you aware about this?Bribe
I am using gcloud as an individual, no organisations attachedDenby
G
3

I encountered the same problem, having an owner account have permissions denied for training a job. I had accidentally added "central1" as the server when it had to be "us-central1". Hopefully this helps!

Grassgreen answered 24/2, 2020 at 13:50 Comment(0)
K
1

I need little more information to be sure, but such error appears when you have different project set in Gcloud SDK. Please verify if project in gcloud config list project is the same as the project you want to use. If not please submit gcloud config set project [YOUR PROJECT]. You can verify the changes with list command again.

Kandis answered 19/12, 2019 at 10:44 Comment(5)
The project is set to the one i would like to use, gcloud config list project reflects this as wellDenby
Do you know what is this path locations/value? Have you used your own code or used some repo?Kandis
I use the main script final_task that calls a few other scripts, all of my own code. However, none of these are called value or are located in a folder locations. There does appear to be a folder called locations in the main google cloud sdk installation folder. No value file though, and this is a fresh installation.Denby
It will be hard without the code, however, the error says Permission denied on 'locations/value' (or it may not exist) so it seems that you are referring to not existing file or path. If I were in your shoes I would search for it in the codeKandis
I don't refer to it anywhere in my code. The code itself also works when i train it locally, but returns the error as soon as I try to submit it as a job on gcloud.Denby
G
1

The issue with me was that my notebook location was in a different region and I was trying to deploy in a different region. After I changed the location to my notebook location, it worked.

Gap answered 20/5, 2020 at 18:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.