我很难将文件复制到我的 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].
最佳答案
在实例名前插入root@
:
local:$ gcloud compute copy-files /Users/Bryan/Documents/Websites/gce/index.php root@example-instance:/var/www/html --zone us-central1-a
关于linux - `gcloud compute copy-files` : permission denied when copying files,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27807018/