LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-25-2005, 04:38 PM   #1
RedHatCore
Member
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 60

Rep: Reputation: 15
Apache misconfigureation??!


I can't get it... I try so hard to chmod my .anything fiels... html mpeg etc nothing works.. finally i give everything EVERYTHING everyone has read write and exeucute... still forbidden

Forbidden

You don't have permission to access /file.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.54 (Fedora) Server at (myserver) Port 80

i tried this already

chmod a+x /var/www/html

and i tried giving everyong everything so it couldn't fail but it still did..

EDIT: PHP files work, but not HTML or MPEG... JPEG also work.. i'm confused.

Last edited by RedHatCore; 08-25-2005 at 08:50 PM.
 
Old 08-25-2005, 10:19 PM   #2
RedHatCore
Member
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 60

Original Poster
Rep: Reputation: 15
anyone?
 
Old 09-01-2005, 12:30 AM   #3
kaverong
LQ Newbie
 
Registered: Sep 2004
Location: Philippines
Distribution: CentOS, Gentoo, Ubuntu, Redhat, Fedora. FreeBSD
Posts: 13

Rep: Reputation: 0
are you running SE Linux? if yes you have change security context.

To find out use ls -Z /var/www/html

you should see something similar to this

-rw-r--r-- apache apache user_ubject_r:httpd_sys_content_t index.html
 
Old 09-01-2005, 09:33 AM   #4
RedHatCore
Member
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 60

Original Poster
Rep: Reputation: 15
Well, when I do an ls -Z on /var/www the HTML folder looks like this:

drwxr-xr-x root root rootbject_r:httpd_sys_content_t html

and when I do an ls -Z on /var/www/html like you said, it gives me a list of the files and they say this on one of the files that I can't access:

-rwxr-xr-x root root rootbject_r:user_home_t thing.txt


I'm on Fedora Core 4

Last edited by RedHatCore; 09-01-2005 at 09:34 AM.
 
Old 09-01-2005, 10:15 PM   #5
kaverong
LQ Newbie
 
Registered: Sep 2004
Location: Philippines
Distribution: CentOS, Gentoo, Ubuntu, Redhat, Fedora. FreeBSD
Posts: 13

Rep: Reputation: 0
som thngs 2 chk

1. check if your document root is on the right location your
/etc/httpd/httpd.conf
should contain

DocumentRoot "/var/www/html"

2. Change your owner:group permission
chown -R apache:apache /var/www

3. Change Security Context

chcon -R -h -u user_u -t httpd_sys_content_t /var/www/html

Last edited by kaverong; 09-01-2005 at 10:19 PM.
 
  


Reply



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
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

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

All times are GMT -5. The time now is 10:16 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