Good set of web hosting permissions?
        Posted  
        
            by 
                Jorge Israel Peña
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Jorge Israel Peña
        
        
        
        Published on 2010-12-23T00:06:10Z
        Indexed on 
            2010/12/23
            0:55 UTC
        
        
        Read the original article
        Hit count: 342
        
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.
© Server Fault or respective owner