Shared Access for Home Directory in google cloud Shell

↘锁芯ラ 提交于 2020-01-16 14:55:17

问题


I am currently using the Google Cloud Shell, and I wish to access the persistent disk of another user. (Not using local shell)

More info on topic of inquiry: https://medium.com/google-cloud/no-localhost-no-problem-using-google-cloud-shell-as-my-full-time-development-environment-22d5a1942439


回答1:


Cloud Shell is a micro vm dedicated to you, free, and with a mounted personal disk.

EDITED: Thanks to @Johnhanley comment, you can access to the cloud shell file of someone else with this code provided. However, you need the credential of the target Cloud Shell env and it's not very secure and recommended.

However, you can mount a fuse directory. And the other user also. With fuse, you navigate in a bucket like in directory. But be carefull, Storage bucket is not a file system: performance and usage aren't the same. Moreover, Fuse don't guaranty the data integrity in case of simultaneous file use, especially writing concurrency. Use with precaution.

But you can have a common workspace if it's your requirement.

If you use Cloud Shell as dev environment, like a computer or a VM, the same best practice are to apply. The dev environment has to be considered as ephemeral (computer can have outage or be lost/stolen, People can leave a company and you no longer have access to their cloud shell), and thereby you have to save your sources frequently on safe space (Git repository, Cloud Storage with Fuse)



来源:https://stackoverflow.com/questions/57715685/shared-access-for-home-directory-in-google-cloud-shell

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