Good set of web hosting permissions?
- by Jorge Israel Peña
Hey guys, I just got a linode and I'm in the process of configuring it. It's running nginx with php-fpm and passenger.
nginx was compiled and is running as user nginx.
php-fpm (php with fastcgi process manager) is running as www-data (in group www-data).
My sites are currently in /var/www, so for example /var/www/test.com
I'm just wondering what the general 'flow' of things is.
So for example, /var/www is owned by root, should I chown of /var/www/test.com to nginx or www-data? Or should I put nginx in the www-data group?
How should site uploading work, I just transfer files to the /var/www/test.com directory as root (sudo) and then chown -R www-data:www-data .?
Thanks. I'm capable of figuring things out on my own, I'm just wondering what the typical/general way of handling users/groups/permissions/site-files is on linux with a webserver.