Apache - how to serve pages with users other than www-data
        Posted  
        
            by johnlai2004
        on Server Fault
        
        See other posts from Server Fault
        
            or by johnlai2004
        
        
        
        Published on 2010-04-12T11:17:25Z
        Indexed on 
            2010/04/12
            11:23 UTC
        
        
        Read the original article
        Hit count: 482
        
apache
|permissions
I have a webserver that uses apache.   When I do a ls -l on /var/www/project1/public_html and /var/www/project2/public_html, I see that they are owned by projectuser1 and projectuser2 respectively.
On some of other servers I've looked at, both /var/www/project1/public_html and /var/www/project2/public_html are owned by only www-data.  How would I go about changing these ownerships to projectuser1 and projectuser2 such that these new users can login to their areas and manage their own websites?
I created a user projectuser1 then did a chown -R projectuser1 /var/www/project1, but any time projectuser1 adds a new file to the directory, Apache gives me a Permission Error.  If do a chown -R www-data /var/www/project1, then everything works again.
Ultimately, I want apache to serve the /var/www/project1 directory with projectuser1 owning it.
© Server Fault or respective owner