本文介绍了`gcloud compute copy-files`:复制文件时权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我很难将文件复制到我的 Google Compute Engine.我在 Google Compute Engine 上使用 Ubuntu 服务器.
I'm having a hard time copying files over to my Google Compute Engine. I am using an Ubuntu server on Google Compute Engine.
我是从我的 OS X 终端执行此操作,并且我已经获得了使用 gcloud
的授权.
I'm doing this from my OS X terminal and I am already authorized using 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
这篇关于`gcloud compute copy-files`:复制文件时权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!