I've just setup a new Droplet over at DigitalOcean before the weekend and have been configuring to my needs. I've been following this previously asked question multiple owner of same folder.
I also found another Q/A on this same forum this weekend talking about security implications and how to properly secure the www folder to minimise any potential risks.
What I've done so far is created a new group webmasters, where I've added myself, any other people that need access and the www-data user.
Applied the
setgidbit on the foldersudo chmod g+s /var/www/htmlso that newly created files and folder belong to the same group to avoid access issues.
Once all that is done, how exactly do I properly secure the /var/www/html folder?
I read somewhere that in a perfect world, the folder would have chmod set to 640 or 2750, and that the www-data user should only have read access, where you manually give it write access to upload folders and so on.
Am I missing something important here?
I'm trying my best to learn.