LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache httpd error (https://www.linuxquestions.org/questions/linux-newbie-8/apache-httpd-error-142102/)

haribon 02-04-2004 03:03 AM

Apache httpd error
 
Hi guys!
I just completed installing the RH9 box. I'm trying to deploy a server now through Apache. I followed the documentation to the letter. The problem is that when I go to localhost i get this message:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster

Error 403

localhost
Wed 04 Feb 2004 04:51:30 PM PHT
Apache/2.0.40 (Red Hat Linux)


What does this mean? Its the all over the site. Does anyone know what sokution can bedone to fix it? Do I have to edit the congig??

Nic-MDKman 02-04-2004 03:36 AM

What are the permissions on the file(s) that you are accessing and the folder(s) that it/they are in? Did you make sure that they are readable by everybody? (a.k.a World readable)

haribon 02-04-2004 04:07 AM

Permissions
 
I don''t seem to recall that as part of the documentation.. Probably the <directory>.. stuff.

I can't understand it. I looking at it sideways and backwards. I even tried to allow full access to one directory but it just lessend the error. Now it says:

Forbidden

You don't have permission to access /marychiles/index.php on this server.
Apache/2.0.40 Server at 127.0.0.1 Port 80


As a consolation though, i can now run phpmyadmin.

Would you know anyway to solve this problem?

haribon 02-04-2004 04:13 AM

THis is the logged error

mod_mime_magic: can't read `/var/www/html/marychiles/index.php'
(13)Permission denied: file permissions deny server access:
/var/www/html/marychiles/index.php

Ashkhan 02-04-2004 04:26 AM

As Nic-MDKman wrote you need to change your html directory and subdirectories as well as files in them to 777.

haribon 02-04-2004 04:37 AM

Quote:

Originally posted by Ashkhan
As Nic-MDKman wrote you need to change your html directory and subdirectories as well as files in them to 777.
Err... I started with RH9 two weeks ago. So I'm fairly new. What do you mean by
1. change html direcoty and subdirectories?
2. 777
3. how do make a file 'world readable"?

jazernorth 02-04-2004 07:58 AM

chmod 655 /var/www/html/marychiles/*

777 is great if you want to give write access to the world. You only want to give read.

Also, read 'man chmod'. It will help you understand file permissions.

In '/var/www/html/marychiles/' type ls -l then on the left you will see the permissions set for each file. Make sure you allow 'rw' to user and 'r' only to group and world.

Enjoy.

JN

haribon 02-05-2004 03:21 AM

THanks, Ill check this out.

Ashkhan 02-06-2004 02:57 AM

Quote:

Originally posted by jazernorth
777 is great if you want to give write access to the world. You only want to give read.
You are right but some complex php scripts also offer configuration. These scripts need also write permissions although only temporarily. Then it is good to switch to 655 as you heve sad.


All times are GMT -5. The time now is 07:55 AM.