i have a problem accessing my php files in my browser, i am using apache as my webserver.
it used to work properly until i messed up things.
now i don;t know what to do.

everytime i open my php files which are on

it gives me the permission denied error.

i think i messed up with the chown and chgrp
i typed all these:

# chown -R root:root /usr/local/apache
# find /usr/local/apache -type d | xargs chmod 755
# find /usr/local/apache -type f | xargs chmod 644

# chmod -R go-r /usr/local/apache/conf
# chmod -R go-r /usr/local/apache/logs

wanting to change permissions so that my apache could create a file.
now it forbids me to do anything.

even if i check on the status of my httpd
/usr/sbin/apachectl status

gives me this error:
you dont have permission to access /server-status on this server.
Apache/2.2.3 (Red Hat) Server at localhost Port 80

same error is given when i check my http://localhost/
you dont have permission to access / on this server.

in the httpd/logs/error.log it gives me this:

- (13)Permission denied: access to /denied
- (13) Permission denied: access to /favicon.ico denied

it seems to restrict me to access anything..

please help, how do i revert back to normal?
i need this to work properly again.

i've tried chmod already to my /var/www/html and /etc/httpd/

but its not working, have i missed on somthing?

thank you so much,

just for the record, problem's solved already

i just checked the permissions of the document roots..

#namei -m /document/root/path

and the permissions were set to 644
replace it with 755

#chmod -R 755 /document/root/path ->recursively changes permission

and then

#ls -ld /var/www/html/
#ls -ld /var/www
#ls -ls /var

to check that it has the 755..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.