2

I set up an Apache2 webserver on the raspberry Pi (Raspbian - Realy close to Debian), and I wanted to download a File from the website. In order to do that, I copied a video file (.avi) to the /var/www/ folder and tried to access it over the website. It told me

Forbidden You don't have permission to access /HIMYM.avi on this server.

I can open all html files but no other files. How can I change that ?

1
  • Just give the file read permission to all users. Only the owner would need write permission and really thats only at the folder level.
    – Ramhound
    Sep 20, 2012 at 13:55

1 Answer 1

2

The file may not have read permission. From the Terminal,

chmod 775 /var/www/HIMYM.avi
3
  • Read permission is enough: chmod 644. With 775 you are giving execute permission and write permission to the group (both not necessary)
    – Matteo
    Sep 20, 2012 at 13:23
  • Thank u ! it works realy great. ( chmod 644 /var/www/HIMYM.avi ) ... but can i do the same thing with an hole folder. i dont want to give each file at once that i has permission?
    – save_jeff
    Sep 20, 2012 at 17:59
  • oh i found the solution. its : sudo chmod 755 /var/www/
    – save_jeff
    Sep 20, 2012 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .