lighttpd (I think?) runs with the user www-data:www-data.
Originally Posted by NuxNik
try something like
If you want the settings to stick (i.e. even if you create files using another user there), do something like
sudo chown -R www-data:www-data /var/www
After running the chown command above to make the group 'sticky' (All files created under /var/www will always be owned by www-data). Its kind of handy, as when you create files there using the root account, the files are owned by root user and root group. The above forces the files to be owned by the root user and the "www-data" group.
sudo chmod -R 2770 /var/www