0

I am trying to upload images on the default Article node type on D7.

The upload works and the image is confirmed via Linux on the file system.

However, the icon of the uploaded image is a broken link image and the same when viewing the page.

I get the following error message:

Forbidden

You don't have permission to access /RT/sites/default/files/field/image/prayer.jpg on this server.

Please help.

UPDATE:

I have been looking into permissions as a solution but with no luck. I went as far as assigning 777 permissions to the files folder and all it's sub-folders and even the target image.

Strangely, I tried uploading an image to an article node on a different website running on the same server which worked. I installed a fresh website and tried it there and that also worked.

Basically, it seems one website among three all on the same server is not responding correctly when I attempt to upload images.

2 Answers 2

1

This is a permissions issue. You need to chmod the directory tree.

Edit: A tutorial on setting directory permissions can be found on drupal.org at Securing file permissions and ownership .

2
  • This answer is OK, but explaining how to "chmod the directory tree" would be more helpful. If the user doesn't understand the message, it is unlikely that he or she understands chmod... Feb 24, 2013 at 6:00
  • I have updated my question with some important points
    – sisko
    Feb 26, 2013 at 13:05
0

I had the same problem.

My apache log file said something about ensuring that the blah/sites/default/files/blah/blah/ directory was executable, so after a lot of trial and error I gave execute permission to all in the files folder:

chmod -R a+x files

I'm not saying this is "the solution" and don't know if this brings security issues to the Drupal installation.

Still cannot understand what suddenly happened since I did not modified file permissions my self and everything was working fine. The problem occurred after editing an article entry with an image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.