Grant a user permissions on www-data owned /var/www
- by George Pearce
I have a simple web server setup for some websites, with a layout something like:
site1: /var/www/site1/public_html/
site2: /var/www/site2/public_html/
I have previously used the root user to manage files, and then given them back to www-data when I was done (WordPress sites, needed for WP Uploads to work). This probably isn't the best way.
I'm trying to find a way to create another user (lets call it user1) that has permission to edit files in site1, but not site2, and doesn't stop the files being 'owned' by www-data. Is there any way for me to do this?