简体   繁体   English

如何授予Google计算引擎实例对云存储桶的访问权限?

[英]How to grant Google compute engine instance access to a cloud storage bucket?

I have a compute engine instance (Ubuntu 16.04) and a storage bucket both in the same project. 我在同一项目中都有一个计算引擎实例(Ubuntu 16.04)和一个存储桶。

I want to mount the storage on the compute instance. 我想在计算实例上安装存储。 I found some resources on this page: https://cloud.google.com/storage/docs/gcs-fuse . 我在此页面上找到了一些资源: https : //cloud.google.com/storage/docs/gcs-fuse

I already installed gcsfuse on the instance and created a directory to mount the storage like this: 我已经在实例上安装了gcsfuse ,并创建了一个目录来装载存储,如下所示:

cd $HOME
mkdir storage

Then I mounted the storage using the gcsfuse command: 然后,我使用gcsfuse命令安装了存储:

gcsfuse storage-bucket storage/

According the gcsfuse output everything looks solid, but when I try to create a test file like: 根据gcsfuse输出,一切看起来都很稳定,但是当我尝试创建如下测试文件时:

touch storage/test.txt

I get the following error: 我收到以下错误:

touch: cannot touch 'storage/test.txt': Input/output error

I'm kinda stuck at the moment, what else should I try? 我现在有点卡住,还应该尝试什么?

Thanks everyone for the support, meanwhile based on this article I managed to set it up for me: 感谢大家的支持,同时根据这篇文章我设法为我设置了它:

https://www.assistanz.com/mount-google-cloud-storage-bucket-linux/ https://www.assistanz.com/mount-google-cloud-storage-bucket-linux/

Also when I created the instance I set the Access scopes to Allow full acces to all Cloud APIs and now it works like a charm! 同样,当我创建实例时,我将访问范围设置为“ 允许对所有Cloud API完全 访问” ,现在它就像一个魅力一样起作用!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 一个授权身份验证的网站用户(App Engine标准)如何授予对Google Cloud Storage存储桶的访问权限? - How does one grant authenticated website users (App Engine standard) access to Google Cloud Storage bucket? 如何授予气流访问权限以在Google Cloud Storage Bucket中创建数据? - How to grant airflow access to create data in Google Cloud Storage Bucket? Google云端存储:如何仅为一个存储桶授予已安装的应用程序访问权限? - Google Cloud Storage: How can I grant an installed application access to only one bucket? Google App Engine应用无法访问Google云端存储分区 - Google App Engine App failed to access Google Cloud Storage bucket "如何使用 gcloud 终端将文件从 Google Cloud Storage 传输到 Compute Engine 实例?" - How to transfer a file from Google Cloud Storage to Compute Engine instance using gcloud terminal? 计算引擎 VM 实例和云存储桶(公共/私有 IP)之间的接口协议是什么? - What is the interface protocol between a compute-engine VM instance and a cloud-storage bucket (public/private IP)? 如何在活动实例中删除 Google Cloud Compute Engine 实例 - How to delete a Google Cloud Compute Engine instance within the active instance 403错误:使用python从Google计算引擎上传到Google云存储桶 - 403 Error : Upload to google cloud storage bucket from google compute engine using python 如何允许用户在不公开访问的情况下从Compute Engine下载Google Cloud Storage文件 - How to allow a user to download a Google Cloud Storage file from Compute Engine without public access 访问 Google Cloud Storage 存储分区 - Access to Google Cloud Storage bucket
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM