You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Martin, Jeremy" <jm...@gsi-kc.com> on 2005/06/17 17:29:31 UTC

[users@httpd] very bizarre "(13)Permission denied" problem

Hi,

We are having an odd problem with certain files showing up as "access
denied" "403 forbidden" in Apache2, CentOS 4 (based on RHES4), PHP5, but
this is not a PHP related problem specifically.. For example, the file
"bad.html" gives these errors. 

(13)Permission denied: access to /bad.html denied

* If we rename bad.html to something else, it still gives the error.
* If we edit bad.html and add more text, it still gives the error.
* Even if we chmod 777 bad.html, it still gives the error. Was 644 by
default.
* If we do "cat bad.html > good.html" then good.html shows up fine but
bad.html still gives that error.
* If we do "cp bad.html good.html" then good.html shows up fine but
bad.html still gives the error.
* If we md5sum bad.html and good.html they match exactly yet one gives
the error and the other doesn't.
* If it was hard drive corruption I'm assuming the md5sum would reveal a
difference?? The inode number for the bad.html is lower than the other
files that are working (4851836 when the working files are in the
615000's) but if the file md5sum's ok and doesn't show up corrupted when
I view it I wouldn't think this would matter.
* Even with mod_rewrite, mod_userdir etc disabled this problem still
happens.


<VirtualHost *:80>
        DocumentRoot /var/www/vhosts/website.com/www
        ServerName website.com
        ErrorLog /var/www/vhosts/website.com/log/error_log
        CustomLog /var/www/vhosts/website.com/log/access_log common
        DirectoryIndex index.php index.html
        <Directory "/var/www/vhosts/website.com/www">
                AllowOverride All
                Options +Indexes
                Allow from all
                Order allow,deny
        </Directory>
</VirtualHost>

There are no .htaccess files in /var/www/vhosts/website.com/www

server www # ls -lahi good.html bad.html
4851836 -rw-r--r--  1 root root 6 Jun 17 10:08 bad.html
6145907 -rw-r--r--  1 root root 5 Jun 17 07:38 good.html

Any suggestions greatly appreciated!!
Jeremy

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] very bizarre "(13)Permission denied" problem

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Jun 17, 2005 at 10:29:31AM -0500, Martin, Jeremy wrote:
> Hi,
> 
> We are having an odd problem with certain files showing up as "access
> denied" "403 forbidden" in Apache2, CentOS 4 (based on RHES4), PHP5, but
> this is not a PHP related problem specifically.. For example, the file
> "bad.html" gives these errors. 

This is probably because of SELinux permissions errors; check the dmesg 
output for "avc" denial errors.  See docs:

http://fedora.redhat.com/docs/selinux-apache-fc3/
http://fedora.redhat.com/docs/selinux-faq-fc3/

Regards,

joe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org