I installed lighttpd. Then I want to give to user "xxx" the permissions to upload in the directory /var/www/foobar.com/htdocs.
So my commands were:
chmod g+w .
chmod -R g+rw /var/www
chown www-data:xxx /var/www/foobar.com/htdocs
but any file I create in the directory from my user can't be read from the web server.
If I give:
chmod www-data:xxx /var/www/foobar.com/htdocs
I can't do anything in the directory
if I give:
chmod xxx:www-data /var/www/foobar.com/htdocs
the web server can't read the content in it.
What would you advise?
Note that having your web directories/files writeable by the web server is a potential security risk.