`gcloud compute copy-files`: permission denied when copying files


I’m having a hard time copying files over to my Google Compute Engine. I am using an Ubuntu server on Google Compute Engine.

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].


insert [email protected] before the instance name:

local:$ gcloud compute copy-files /Users/Bryan/Documents/Websites/gce/index.php [email protected]:/var/www/html --zone us-central1-a

Answered By – Mailis Toompuu

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published