I used this guide to install nginx and WordPress on a Ubuntu VPS. The guide instructs you to set the owner of the /var/www directory to nginx:nginx. When I use SFTP, I log in with the name ubuntu, but this name doesn't have permission to write any of the files that nginx owns.
My question is... what would be the ideal way to do the following:
- To grant user
ubuntuproper permission to write to files in/var/wwwvia SFTP - Keep
nginxthe owner of/var/wwwso WordPress can continue to auto-update files
Would it be as simple as adding ubuntu to the nginx group? My concern is security, and I'm wondering what would be the most secure way of accomplishing the above.