Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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..?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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