Apache problem: When I link to a file in a subdirectory I get a Forbidden error..

Posted:
in Genius Bar edited January 2014
When I link to a file that is in a subdirectory on my website hosted on my mac, I get an error message.



Go to this page, http://68.209.235.224/~eric/kurowski.html, and click the photograph. The photo links to the large version of the photo (2+ meg in size).





-Error Message



Forbidden

You don't have permission to access /~eric/images/IMG_3254.JPG on this server.





Apache/1.3.33 Server at eric-bargers-computer.local Port 80

---



I am sure there is a setting I need to change but I don't have a clue where to start.

Regards,



Eric

Comments

  • Reply 1 of 3
    Quote:

    Originally posted by aplnub

    When I link to a file that is in a subdirectory on my website hosted on my mac, I get an error message.



    Go to this page, http://68.209.235.224/~eric/kurowski.html, and click the photograph. The photo links to the large version of the photo (2+ meg in size).





    -Error Message



    Forbidden

    You don't have permission to access /~eric/images/IMG_3254.JPG on this server.





    Apache/1.3.33 Server at eric-bargers-computer.local Port 80

    ---



    I am sure there is a setting I need to change but I don't have a clue where to start.

    Regards,



    Eric




    You should check and see whether the permissions on that images folder and (perhaps) the image file itself are set correctly. They should be readable by everyone.

    You can set permissions either via the Finder (select the item whose permissions you wish to set, press "command-i" to bring up the info panel where you can set the perms) or via the terminal (open terminal, cd to the directory containing the item, type 'chmod 644 foobar' - with 'foobar' being the item's name - and hit enter).



    Greetings,

    durandal
  • Reply 2 of 3
    aplnubaplnub Posts: 2,605member
    Thanks! I can change the permission and get it to work.



    However, which permission do I need to change to keep my security to a max and not let other "users" of my machine mess with it?



    You can see I have the "Others" I have it set to Read Only. I changed that from "No Access". I can choose "www" under the "You Can" box.







  • Reply 3 of 3
    benzenebenzene Posts: 338member
    Well, as long as all users other than yourself have "read only", all they can do is look at it.

    You could set group to "www" (or whatever apache is set to), and then allow read only access, but if it's publically avalible on the web, why restrict local users from looking at it?



    Basically, what you have there is fine.
Sign In or Register to comment.