I've configured a ftp server on my Ubuntu box, and added a user to it. Now when I upload files to /var/www, the files aren't viewable on the web.

I'm using lighttpd as my webserver, which runs as user www-data. The ftp username is 'bla', who is in group ftpusers.

I'm a bit stumped now. Is the problem that lighttpd can't serve images which aren't owned by www-data? Or should I change the group of 'bla' to the same group www-data is in? Or..?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

You need to make sure the uploaded files are readable by the web server. Either the www-data user or its group should be able to read the files. Otherwise, the files should be world-readable. If none is the case, the files will not be served the web server.

It is recommended to add the www-data group to the ftpusers group and grant the group read permissions.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.