I just had a site outage after deploying some code changes. Somehow, some of my directories and files had become owned by root instead of www-data which apparently denied some sort of access. I'm not exactly sure how it happens and what the deal is with www-data.
I'm running Cherokee on Ubuntu. For deployment I use fabric to hg pull from bitbucket. I forgot which forlders/files were affected because I did a recursive chown on the whole directory. Can anyone help me understand the need for www-data ownership and how to make sure my files/folders remain properly owned. Thanks.