0

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?

1

1 Answer 1

2
  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.
2
  • 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, 2011 at 23:16
  • Might be in a different location on your host. It's pointed to by the ErrorLog directive. Oct 29, 2011 at 0:25

You must log in to answer this question.

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