Red Hat Bugzilla – Bug 213002
Apache-2.2.3 shows Forbidden error
Last modified: 2007-11-30 17:11:47 EST
Description of problem:
The file I am trying to access has proper permission (644) to be accessed. But
it cannot be accessed. while other files with same permissions and in the same
directory can be accessed. the error shows in the browser is:
You don't have permission to access /icon.jpg on this server.
And the error in /var/log/httpd/error_log is:
[Mon Oct 30 20:18:14 2006] [error] [client 127.0.0.1] (13)Permission denied:
access to /icon.jpg denied
Version-Release number of selected component (if applicable):
Download a file (a jpeg image for example) from Internet and save it in your
document root (e.g. /var/www/html/). Set the proper permission on it. Start
httpd (if stopped). Then try to access the file by entering
http://127.0.0.1/[filename] in the browser. The error "Forbidden" might show.
Steps to Reproduce:
Error shows: Forbidden
The file should be accessed. In my case the jpeg image(icon.jpg) should be
It is a strange problem. When I make a copy of the file, the new copy can be
accessed. But when I rename it, the problem remains!
This is probably due to SELinux. Try:
# restorecon /var/www/html/<filename>
or try email@example.com or firstname.lastname@example.org for more help.
(In reply to comment #1)
Yes, problem solved. It was due to SELinux. Thanks Joe Orton.