Enable storage permission on Google Cloud VM instance

自古美人都是妖i 提交于 2019-12-22 09:43:40

问题


I have a Google Cloud VM instance, but I overlooked setting the Storage permission to read-write when creating it.

Now further down the line, I'm looking to experiment with cloud storage, but my instance is read-only.

How can this be changed? I understand it may be possible by relaxing the storage buckets policy, but I'd prefer my instance had write access to all future project buckets.

I presume there is an option in gcloud to change the devstorage parameter?


回答1:


You can update the permissions of your VM instance now but only when it is shut down. Check the following documentation:

Changing the service account and access scopes for an instance

If you want to update the API permissions for the kuberntes clusters VM instance then you cannot do that unless you create a new cluster and give the API access to the nodes associated with the clusters.




回答2:


So, you can't change the option to grant the VM permission, but I did find that you can just run

gcloud auth login

then you can sign in with your management account from the VM and you'll be able to run commands that way.




回答3:


Unfortunately you can't change the scopes of the VM. You will have to create a new one to change them.

When you create a new one you can reuse the disk of the old VM, if that helps avoid the pain.




回答4:


I believe they have added the option to change it now, without creating another VM. Once you have stopped the instances, click on the instances you want to change. On the top there is a Edit button, you can click on it and change any the permissions.

Hope the image helps edit button

Once you have changed the permission to read_write and it still says Access Denied. Go in your instance SSH browser window and enter 'gcloud auth login', follow the steps and hopefully it works!



来源:https://stackoverflow.com/questions/31110900/enable-storage-permission-on-google-cloud-vm-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!