LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2006, 08:01 AM   #1
abegetchell
Member
 
Registered: Mar 2006
Distribution: RHEL, Fedora, Ubuntu
Posts: 32

Rep: Reputation: 15
Question Apache configuration problem?


Hi all,

I drove myself crazy yesterday for a couple of hours trying to figure out what I think is an Apache configuration issue on a freshly installed RHEL 4.0 ES system. When I drop some HTML files in /var/www/html I can access these without issue. When I drop a couple of GIFs in the same directory I get the following error attempting to access the GIFs:

Forbidden

You don't have permission to access /image.gif on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.0.52 (Red Hat) Server at XXX.XXX.XXX.XXX Port 80


Now, I thought it must have been a permissions problem, given that httpd couldn't seem to access the GIF or the error page to tell me that it couldn't access the GIF, but could access the HTML without issues. When checking the permissions on both the GIF and the error pages, I find that they are exactly the same (ownership and permissions) as the HTML files I can access.

Any ideas? I feel like I'm missing something simple here.
 
Old 03-21-2006, 08:47 AM   #2
abegetchell
Member
 
Registered: Mar 2006
Distribution: RHEL, Fedora, Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
Exclamation

The plot thickens. Kernel auditing. From /var/log/messages:

Code:
Mar 21 09:40:15 XXXXXXXXXXXX kernel: audit(1142952015.939:578): avc:  denied  { getattr } for  pid=24691 comm="httpd" name="image.gif" dev=sda3 ino=3555340 scontext=root:system_r:httpd_t tcontext=user_u:object_r:user_home_t tclass=file
 
Old 03-21-2006, 10:18 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Are you using selinux? If so try doing "setenforce 0" then try to access the images from the web browser. I turned it off because it was driving me mad and I don't really need it.
 
Old 03-21-2006, 10:25 AM   #4
abegetchell
Member
 
Registered: Mar 2006
Distribution: RHEL, Fedora, Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by reddazz
Are you using selinux? If so try doing "setenforce 0" then try to access the images from the web browser. I turned it off because it was driving me mad and I don't really need it.
Yup, I'm using SELinux. Running "setenforce 0" (turning SELinux off) did fix the issue, though I'd like to figure out exactly what and how it was doing to cause problems. Why the heck would SELinux not allow httpd to read images from disk?

Thanks for your help!
 
Old 03-21-2006, 10:36 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by abegetchell
Yup, I'm using SELinux. Running "setenforce 0" (turning SELinux off) did fix the issue, though I'd like to figure out exactly what and how it was doing to cause problems. Why the heck would SELinux not allow httpd to read images from disk?

Thanks for your help!
Its something to do with the policies but I can't be more precise because I have not delved much into selinux. There are selinux related manuals if you search for RHEL docs on the Redhat website.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache configuration problem malikperera Linux - Software 0 08-11-2004 05:41 AM
Apache Intranet Configuration Problem ericleunghk Red Hat 0 05-16-2004 05:16 AM
Apache: Virtualhost configuration problem deepika Linux - Software 3 08-12-2003 10:13 AM
problem with apache configuration niehls Linux - Software 2 02-21-2003 11:18 AM
Apache configuration problem Lindis Linux - General 2 11-12-2000 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration