2

I have two files stored in /var/www/

pi@babaloo /var/www/test $ ls -l
total 8
-rwxrwxrwx 1 pi pi 123 Nov  8 00:23 refresh.php
-rwxrwxrwx 1 pi pi 989 Nov  5 17:41 share.php

when i try to open refresh.php from my browser, I get a 500 response from refresh.php on share.php everything is ok.

dont know why, whats the reason and how to solve it ???

Whats the meaning of the "8" and "5" ?? may that cause the error?

EDIT: I just noticed, that all new files I create have the same problem. Old files are ok. I dont know what happend - any ideas what could be the reason and what can I do to fix this ?

s3bi
  • 160
  • 1
  • 2
  • 7

2 Answers2

2

After uninstalling lighttpd and installing it again the problem has been solved.

But I still don't know why!?

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105
s3bi
  • 160
  • 1
  • 2
  • 7
1

You also need to check the permissions of the directory /var/www/test to see if that is accessible for everyone:

ls -l /var/www

If test is owned by pi or root, the server won't be able to access the files inside it.

By default lighthttpd runs as user www-data, and can't access pi's files. You could use this command to change everything in /var/www to be owned by www-data:

sudo chown www-data:www-data -R /var/www

Then lighthttpd should be able to serve those files.

Steve
  • 1,431
  • 10
  • 8