PDA

View Full Version : Apache Problem: access to /index.html denied


prismbiz
3rd September 2005, 03:47 AM
I recently installed Apache 2.0.54 on FC4. I took the httpd.conf file I was using successfully on FC3 and now when I try and visit my Web site I get:

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

This is strange to me. Would appreciate help!


Snippets of information:

[root@tigger bin]# ls -ld /var/www/html
drwxr-xr-x 4 root root 4096 Aug 28 16:39 /var/www/html

[root@tigger bin]# ll /var/www/html/index.html
-rw-r--r-- 1 apache apache 3515 Oct 23 2004 /var/www/html/index.html

From httpd.conf ...

DocumentRoot "/var/www/html"
Options -ExecCGI -FollowSymLinks -SymLinksIfOwnerMatch -Includes +IncludesNOEXEC +Indexes +MultiViews

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">
Options Indexes Includes
AllowOverride None
Order allow,deny
Allow from all

</Directory>

bubudiu
4th September 2005, 03:02 PM
Mr SELINUX? Any avc denied messages in your logs?

jim
4th September 2005, 03:43 PM
what error are you getting ? 404 ? 403 ? 401 ?
As the above post states is selinux configured to allow http requests?
http://www.fedorajim.homelinux.com/pages/Webserver-How-To.html
see step 4

Ifthat doesn't solve it, what are the permissions of the direcory? and files within the directory...

prismbiz
5th September 2005, 05:33 PM
In responses to the two posts:

1. No, I do not see any avc error messages (checked /var/log/messages)
2. I reviewed the Web page provided to see if httpd is enabled in selinux and it appears to be

The directory permissions are:

[root@tigger ~]# ls -ld /var/www/html
drwxr-xr-x 4 root root 4096 Aug 28 16:39 /var/www/html

[root@tigger ~]# ll /var/www/html/index.html
-rw-r--r-- 1 apache apache 3515 Oct 23 2004 /var/www/html/index.html

christianl
6th September 2005, 09:09 AM
I have been dealing with this same screwed up problem, I started a domain then paid for two years on Canaca.com and managed to get only the text loaded and only one page of ten I built but I could overwrite it and used the /var/www/html/index.html to overwrite it with no problems, then I get the apache page and this string on the directory to go to /etc/httpd/conf.d/welcome.conf. and when I follow the directory it veers like this /etc/httpd/conf/ then it goes to ssl's but there is no conf.d/welcome.conf. in my directory to go to and why did they come in and overwrite me and not email me or give me clear cut and paste it here to fix this crap. I was suggested the CUTEftp software and still am shut down and it hasn't helped that Canaca.com doesn't give me any real concise direction either and have been on the old thumbs for Labor Day.

christianl
6th September 2005, 09:12 AM
This all has been happening for over two weeks and it does suck for sure but not as bad as being in New Orleans is all I keep thinking to keep cool about this hijacking by Apache. by the way I am christianlepanto.com to visit the hijacking and I need a little help to get this cleared up and whoever does gets a warhol or a basquiat they will cherish I promise it is only one of ten in the world but get me going now now now. I will pay the postage to send it to you as well. your friend in need. christian lepanto@yahoo.com

christianl
6th September 2005, 09:13 AM
sorry thats christianlepanto@yahoo.com

christianl
6th September 2005, 09:15 AM
please check out christianlepanto.com and see the code they left for me and it doesn't exist in my directory and I have checked my permissions. christian

christianl
6th September 2005, 09:17 AM
I am christianlepanto.com and was hijacked by the fedora page and can't seem to get it wiped out with an overwrite, do you have any ideas for me. christian

christianl
6th September 2005, 09:18 AM
this is christianlepanto.com and I was hijacked by the fedora page like two weeks ago and can't seem to overwrite. any suggestions? christian

dmode
6th September 2005, 09:19 AM
Have you tried this:
chcon -R -h -t httpd_sys_content_t /var/www/html

christianl
6th September 2005, 09:36 AM
there is no chcon and also ther is no _sys_ after httpd/ to go to so those are both dead ends christian and someone please explain how and why I was hijacked and is it legal to just me walked over like that when your already up and running? christian

jim
6th September 2005, 09:40 AM
what do you mean hijcked?

I visited the site and see a apache default page.

what is in var/www/html ?

ll /var/www/html/

jim
6th September 2005, 09:49 AM
as root copy the following to a html file and save it to /var/www/html/


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>tesing (66.49.253.243)</title>
<meta name="generator" content="Bluefish 1.0.3">
<meta name="author" content="jim">
<meta name="date" content="2005-09-06T04:48:10-0400">
<meta name="copyright" content="">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Expires" content="">
<meta http-equiv="refresh" content="5; URL=http://">
</head>
<body>
<b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><br/>
<b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><br/>
<b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><br/>
<b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><br/>
<b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><br/>
<b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><b>TESTING</b><br/>

</body>
</html>

christianl
8th September 2005, 10:06 AM
I never had a fedora home page until they took down my content then proceeded to put up fedora and I have my original canaca.com page that was the infant of my website. I never birthed from fedora I was mutated into it with my information taken from the public eye. That is hijacked in my book.
I blog it almost everyday and to be denied the overwrite on the /var/html/index.html bites ass and I have to fix something I didn't break. I just didn't secure it enough and will need to it seems but I gave no permission to use my name or my ip address for fedora. I want it off and out of my hair. I just am busy raising a newborn at the same time so its a juggle and the real baby is more important and the web can wait. christian lepanto the usurped

grndhg13
30th September 2005, 03:32 PM
HELP!!

New to Linux... just learning but have years of experience with apache 2 on Windows.

I'm trying to learn this Linux system and just installed Fedora core.
I now have http up and running the default page, but when I put and index.hmtl file in my document root I'm getting the

FORBIDDEN
You don't have permission to access /index.html

I checked all directives against my XP Apache2 and they appear to match almost exactly, so I'm guessing it is now something with Fedora.

I have looked up everything I could, disable the SELinux security totally, and have ended up here.

what is CHCON ??? and how do I run it.

Thanks in advance for any help!!

Ed Conley Jr. aka grndhg13

grndhg13
30th September 2005, 04:00 PM
Have you tried this:
chcon -R -h -t httpd_sys_content_t /var/www/html

I'm running this from the terminal as root and got invalid context: httpd_sys_content_t

brandor
30th September 2005, 05:30 PM
You now have SELinux disabled?

Is the documentroot in the default location? Or do you have it moved somewhere else?

grndhg13
30th September 2005, 08:58 PM
I finally figured it out.

You must turn on GROUP and OTHER -- Read Access on the files. For some reason these attributes are off by default, and Linux was denying access.

Now for the next question:

Can someone tell me how to set the directory defaults for this security so I don't have to edit each file individually?

Thanks!

San Andres Travel Photos - Konibodom Travel Photos - Bergama Instagram Photos