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 been given a task to fix this one website. One of its issues is that on one page, the images have broken links - the images are not showing, and clicking on the image (i.e. direct link to the image file) results in a 403 (Forbidden) error. I am looking for some feedback on what could be the possible cause.

The directory where the images are stored has the following permissions:

drwxrws--- www "group" 10240 Aug 2008 "image directory name"

I had to hide the names. I checked the page source code, and everything seems to be in place. The rest of the site, and other images outside that image directory are showing fine. I was told that recently there have been some changes to the server. I'm trying to assume that there is no fault in the source code, and the permissions are - or used to be - correct (since the site has been working before, and no recent changes to the site itself have been made).

My only thoughts at the moment is that either: a) the directory permission should be: drwxrws--x (executable) for the other users, or b) there is a change in the server settings that I don't know of.

Is there anything else I should check?

share|improve this question

migrated from stackoverflow.com Nov 22 '11 at 8:24

This question came from our site for professional and enthusiast programmers.

1  
As always, the logs. –  Ignacio Vazquez-Abrams Oct 28 '11 at 22:41
    
Thanks for the edit, Anna. I missed that one. –  mathiass Oct 28 '11 at 23:14

1 Answer 1

up vote 1 down vote accepted
  1. Try making the directory and all of the images in it public:

    chmod 0755 "image directory name"
    chmod 0644 "image directory name"/*
    

    Then reload the images in the browser. You might need to clear the browser cache, or hit shift-reload, or even restart Apache.

  2. Look in the Apache error log (/var/log/apache/error.log, or wherever the ErrorLog directive points to) to see what it says about the 403 error.
share|improve this answer
    
There doesn't seem to be a /var/log/apache/error.log file in this system. Does it vary with different systems, or I just don't have the permissions for it yet? (2nd day on the job) –  mathiass Oct 28 '11 at 23:16
    
Might be in a different location on your host. It's pointed to by the ErrorLog directive. –  Andrew Schulman Oct 29 '11 at 0:25

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.