Reputation: 9648
I've got a google compute engine instance that I've connected to via SFTP using my SSH keys associated with my glcoud account. However I can't upload any files to the /var/www directories, though I can read directory listings. /var/www is owned by www-data:www-data Is it a question of adding my user to the www-data group or is this a bad idea?
My other thought was do I just upload my website files to my home directory and then sudo cp them to the var/www directory and recursively change ownership to www-data?
The server is ubuntu 16.04 running NGINX
Upvotes: 0
Views: 60
Reputation: 528
Both ways can work well. However, I will suggest you the second one as adding more permissions is adding more ways to access private data, and it can be performed by other users (already with access to the VM) without adding even more permission to the www-data group.
Upvotes: 1