-
web error 403
Hi,
I am trying to setup powerdns and to do this I need to access a web page that has been setup by powerdns. For some reason I get the error 403 forbidden can I cannot for the life of me figure our what is wrong.
I am not a web guy but willing to learn as i think I have to. :)
The directory is /var/www/html/poweradmin/
What do I need to setup to get this to work?
-
you had better done some more elaboration. This things happens because of the file or page you are trying to access have been restricted by the accesslist. You better check the acl of the file. You can simple give read and execute permission to all with read, write and execute to the owner just use the chmod command to do it.
The other cause may be the robot.txt. So go check for this robot file in your web directory and make sure the file and directory you are going to access is not denied.
-
Here is what I have;
Code:
[Mon Jun 13 12:17:10] [root@vm7] /var/www/html
html $ lt
total 8
drwxr-xr-x 10 apache apache 4096 Dec 23 00:26 poweradmin
[Mon Jun 13 12:17:11] [root@vm7] /var/www/html
html $ cd poweradmin/
[Mon Jun 13 12:17:16] [root@vm7] /var/www/html/poweradmin
poweradmin $ lt
total 392
-rw-r--r-- 1 apache apache 26 Apr 10 2007 robots.txt
-rw-r--r-- 1 apache apache 7818 Mar 25 2010 search.php
-rw-r--r-- 1 apache apache 2488 Mar 25 2010 list_supermasters.php
-rw-r--r-- 1 apache apache 2448 Mar 25 2010 list_perm_templ.php
-rw-r--r-- 1 apache apache 2935 Mar 25 2010 edit_perm_templ.php
-rw-r--r-- 1 apache apache 3584 Apr 25 2010 edit_comment.php
-rw-r--r-- 1 apache apache 1406 May 16 2010 favicon.ico
-rw-r--r-- 1 apache apache 3884 Jun 15 2010 add_zone_slave.php
-rw-r--r-- 1 apache apache 2946 Jun 19 2010 delete_zone_templ_record.php
-rw-r--r-- 1 apache apache 2080 Jun 19 2010 delete_zone_templ.php
-rw-r--r-- 1 apache apache 2002 Jun 19 2010 delete_perm_templ.php
-rw-r--r-- 1 apache apache 4935 Jun 19 2010 add_zone_templ_record.php
-rw-r--r-- 1 apache apache 5284 Jun 19 2010 add_record.php
-rw-r--r-- 1 apache apache 3334 Jun 19 2010 add_user.php
-rw-r--r-- 1 apache apache 2183 Jun 29 2010 change_password.php
-rw-r--r-- 1 apache apache 6095 Jun 29 2010 edit_user.php
-rw-r--r-- 1 apache apache 2374 Jun 29 2010 list_zone_templ.php
-rw-r--r-- 1 apache apache 2504 Jun 29 2010 add_perm_templ.php
-rw-r--r-- 1 apache apache 2952 Jul 29 2010 index.php
-rw-r--r-- 1 apache apache 2929 Aug 19 2010 delete_domain.php
-rw-r--r-- 1 apache apache 3900 Sep 14 2010 dynamic_update.php
-rw-r--r-- 1 apache apache 5552 Nov 4 2010 users.php
-rw-r--r-- 1 apache apache 2049 Nov 23 2010 add_zone_templ.php
-rw-r--r-- 1 apache apache 3999 Nov 25 2010 delete_user.php
-rw-r--r-- 1 apache apache 5310 Nov 29 2010 list_zones.php
-rw-r--r-- 1 apache apache 3544 Nov 29 2010 delete_domains.php
-rw-r--r-- 1 apache apache 3809 Dec 1 2010 edit_zone_templ_record.php
-rw-r--r-- 1 apache apache 4862 Dec 2 2010 edit_record.php
-rw-r--r-- 1 apache apache 3763 Dec 2 2010 delete_record.php
-rw-r--r-- 1 apache apache 5554 Dec 8 2010 add_zone_master.php
-rw-r--r-- 1 apache apache 18687 Dec 8 2010 edit.php
-rw-r--r-- 1 apache apache 2403 Dec 10 2010 delete_supermaster.php
-rw-r--r-- 1 apache apache 8858 Dec 10 2010 edit_zone_templ.php
-rw-r--r-- 1 apache apache 3817 Dec 10 2010 add_supermaster.php
drwxr-xr-x 2 apache apache 4096 Dec 23 00:26 docs
drwxr-xr-x 9 apache apache 4096 Dec 23 00:26 locale
drwxr-xr-x 3 apache apache 4096 Dec 23 00:26 tests
drwxr-xr-x 2 apache apache 4096 Dec 23 00:26 images
drwxr-xr-x 2 apache apache 4096 Dec 23 00:26 addons
drwxr-xr-x 2 apache apache 4096 Dec 23 00:26 style
drwxr-xr-x 2 apache apache 4096 Dec 23 00:26 install
drwxr-xr-x 2 apache apache 4096 Jun 4 19:41 inc
[Mon Jun 13 12:17:18] [root@vm7] /var/www/html/poweradmin
poweradmin $ cat robots.txt
User-agent: *
Disallow: /
What else needs to be done?
-
Read the apache error log, all the informations that you need to know what happened should be there
Code:
less /etc/httpd/logs/error_log # for example
Just a note ,I've noticed that all of your files owned by apache, if that `ls` from a
working site, this would cause a security risk.
if someone for example were able to upload a php script using a bug in
your site, he would be able to modify/remove/add what he want after
changing the permissions of files becouse he would be the owner "apache"
you should change the owner to your user name:
Code:
chown -R USER:GROUP /path/
-
OK, I have looked at the logs but still do not know how to fix the issue. I am not a web guy myself only playing around with some software. Here are the errors.
Code:
[Fri Jun 10 01:23:47 2011] [error] [client 1.2.3.4] (13)Permission denied: access to /poweradmin/install/index.php denied
[Fri Jun 10 01:34:17 2011] [error] [client 1.2.3.4] (13)Permission denied: access to /poweradmin/install/index.php denied
[Fri Jun 10 03:33:25 2011] [error] [client 1.2.3.4] (13)Permission denied: access to /poweradmin/install/index.php denied
/poweradmin/install/ is under /var/www/html/
As to the permissions i am playing with this ona VM so not really worried at this point in time about security, but thank you kindly for the feed back.
-
Perhaps one directory of that path is unexecuted (permitted 700 e.g)
try to type :
Code:
chmod 755 /var/www/ && find /var/www/ -type d | xargs chmod 755
If that didn't work, your might use SElinux.. disable it and try to access
that file
-
Yep, that was the problem. Never though of disabling it to try. Thnx for pointing this out.