微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

文件未保存在 GCS 容器/存储桶中

如何解决文件未保存在 GCS 容器/存储桶中

我在 Google Compute Engine 虚拟机内使用 rgee 上的最新版本,在我的情况下使用 RStudio Server:

library("googleCloudStorageR")
library("rgee")

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
library("googleCloudStorageR")
Setting scopes to https://www.googleapis.com/auth/devstorage.full_control and https://www.googleapis.com/auth/cloud-platform
Successfully auto-authenticated via /home/forestcloud/fc_CMPC_v01/API_code/fc-vm-v1-69de84eb838a.json
Set default bucket name to 'f-cmpc-s2'
> library("rgee")
> # Initialize the Earth Engine session -----------------------------------------
> ee_Initialize("f-cmpc-s2",gcs = TRUE)
── rgee 1.0.9 ──────────────────────────────────────────────────────────────────────────────────────── earthengine-api 0.1.266 ── 
 ✓ email: f-cmpc-s2 
 ✓ GCS credentials:  FOUND
 ✓ Initializing Google Earth Engine:  DONE!
 ✓ Earth Engine user: users/fitlab 
─────────────────────────────────────────────────────────────────────────────────────────

我的“f-cmpc-s2”容器在自动验证成功和 GCS 凭据中看起来还不错,但是如果我尝试下载 S2 图像:

# Download the results
s2_ic_local <- ee_imagecollection_to_local(
    ic = s2_roi,scale = 10,region = roi,container = "f-cmpc-s2",via = "gcs",dsn = paste0(gsub(".shp","",ID_all[6]))
)
-------------------------------------------------------------------------------- Downloading ImageCollection - via gcs --- region parameters
sfg      : polyGON ((-54.1952 -30.7182 .... .70724,-54.1952 -30.71826)) 
CRS      : GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,..... 
geodesic : TRUE 
evenOdd  : TRUE 
Downloading: VILAPALMA042A20210512T133229_20210512T133223_T21JYF.tif ERROR in Earth Engine servers: Unable to write to bucket f-cmpc-s2 (permission denied).
Error in ee_monitoring(task = task,quiet = quiet) : 
  ee_monitoring was forced to stop before getting results

Unable to write to bucket f-cmpc-s2 (permission denied),尽管我将 Google Storage 中的所有权限都授予了 gcs-auth-file@fc-vm-v1.iam.gserviceaccount.com 并且 *json 密钥是更新:

bucket

请问有什么可以帮助解决的吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。