文件未保存在 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 (将#修改为@)