-1

I created a LAMP stack instance on Google Compute Engine and followed the instructions for setting up FTP as described here.

Most of this worked, I can view files and ftp files to my local workstation FROM the instance. The problem is I can't ftp files TO the instance. Whenever I try to do so Filezilla gives me a permission denied error.

I tried right clicking on the "www" folder in Filezilla to set the permissions but that didn't work.

I'm guessing that write permissions have to be set by SSH-ing to the server and executing some sort of command but I'm not sure how to do that.

Any ideas as to how to go about doing this would be appreciated.

user2744119
  • 153
  • 11
  • I see you mention FTP(port 21), and the tutorial is for SFTP (22). The tutorial describes how to connect from local machine to Google Server, not the other way around. What is the actual error you are getting ? You may need to check the permissions on the GCE instance for the user you are connected as. If the user does not have permissions to let's say "www" folder, then you will not be able to access it. chmod 644 is the option described in the documentation for HTML files. Check if "$ gcloud compute ssh instance-name" is working for you. – Marius I Mar 16 '15 at 14:57
  • I figured it out. I just had to do a sudo chmod 644 directory-name. Thanks – user2744119 Mar 17 '15 at 11:59
  • Is that all you had to do? As nothing is working for me, I'm constantly getting permission denied. My user is part of the www-data group but the owner of /var/www is root (as was installed by Apache). – Lee Feb 08 '16 at 11:35

1 Answers1

2

By default the /var/www directory is owned by 'www-data' on the debian instance. You should add your user to the 'www-data' group, and give the directory +rw (read and write) for groups.

corey
  • 21
  • 1
  • I'm having the same issue, and haven't been able to properly FTP into my compute engine for weeks now. After installing apache, the /var/www folder is showing as owned by root root. I've tried to add my user to the www-data groups, but I still cannot upload anything. what else is there to do? – Lee Feb 08 '16 at 11:34