Apache 403 Forbiddens
Came across a weird error with Apache the other day, where a HTML file created on MS Windows was uploaded to the web root on a GNU/Linux box. The file permissions were set appropriately and for absolutely no visible reason, when the new page was called from our browser, Apache serves us a HTTP 403 Forbidden error message.
After a little bit of scratching our heads trying to figure out what it could be, it turns out that file permissions alone are not enough for Apache to serve content appropriately. If you are ever uploading content from a Windows box using WinSCP make sure you jump on to the box afterwards and set the line endings to be UNIX not Windows using the dos2unix command!
It seems that the Filezilla SFTP client doesn’t seem to suffer this problem




zomg.. u serious? i had this problem with my wp gallery (where it would randomly 403′ed the viewer a photo/album). ram and i were totally stumped why it was doing it and how to fix it… one of the reasons y i moved off to flickr =)
squishies
August 25, 2008 at 12:52 am