0

I created an SSH key to connect my google VM instance to FileZilla. But I get permission errors.

For example, I want to replace the index.html.

enter image description here

But I get:

enter image description here

How do I get my SSH key user to have full permission to create the website?

I also cannot change anything with my google terminal

enter image description here

2 Answers 2

0

The quick solution would be to chmod -R 666 /var/ww/html enabling read and write permission to the group and everyone.

For security reasons this is not advised and your webserver/daemon should really be running as a limited user. If your webserver was running as, for example user:html then the owner and group of the folders could be updated to reflect this and your ssh key user could be added to the html group.

1
  • Thanks! But I got the answer above. I made the user the owner of the directory. Now when I log into /var/www/html the user can do whatever. Aug 2, 2018 at 6:14
0

You can let your user own the directory. Once you create a SSH key user, go to your Google Cloud terminal located on the SSH button beside your VM instance. Then add the code below. This way you do not need to change any permissions for the file.

sudo chown USERNAME DIRECTORY

The directory in this case is the one with the website files /var/www/html

Now when you log into FileZilla with an SSH key user, you can edit the folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .