一尘不染

gcloud compute copy-files:复制文件时拒绝权限

linux

我很难将文件复制到我的Google Compute Engine中。我在Google Compute Engine上使用Ubuntu服务器。

我正在OS X终端上执行此操作,并且已经获得使用的授权gcloud

local:$ gcloud compute copy-files /Users/Bryan/Documents/Websites/gce/index.php example-instance:/var/www/html --zone us-central1-a
Warning: Permanently added '<IP>' (RSA) to the list of known hosts.
scp: /var/www/html/index.php: Permission denied
ERROR: (gcloud.compute.copy-files) [/usr/bin/scp] exited with return code [1].

阅读 245

收藏
2020-06-03

共1个答案

一尘不染

root@在实例名称之前插入:

local:$ gcloud compute copy-files /Users/Bryan/Documents/Websites/gce/index.php root@example-instance:/var/www/html --zone us-central1-a
2020-06-03