You don't have permission to access /php.php on this server.
Re: You don't have permission to access /php.php on this server.
Looks more like you had changed DocumentRoot to "/"
Re: You don't have permission to access /php.php on this ser
All files and directories are labeled with a type according to SELinux policy.
Type following command as root and see what type the file is.
ls -Z /var/www/html/<your file path> Ex: ls -Z /var/www/html/index.html
if it has read access then it should show type as httpd_sys_content_t. if it is something else like "user_home_t" or "samba_share_t" then you won't be able to access it even if it has write permission on your linux box.
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 /var/www/html/index.html
run the following command to change the type of the file and restart the server. you should be able to access.
chcon -R -t httpd_sys_content_t /var/www/html/index.html
to make it permanent
semanage fcontext -a -t httpd_sys_content_t /var/www/html/index.html
then restart your server.
Type following command as root and see what type the file is.
ls -Z /var/www/html/<your file path> Ex: ls -Z /var/www/html/index.html
if it has read access then it should show type as httpd_sys_content_t. if it is something else like "user_home_t" or "samba_share_t" then you won't be able to access it even if it has write permission on your linux box.
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 /var/www/html/index.html
run the following command to change the type of the file and restart the server. you should be able to access.
chcon -R -t httpd_sys_content_t /var/www/html/index.html
to make it permanent
semanage fcontext -a -t httpd_sys_content_t /var/www/html/index.html
then restart your server.
-
- Posts: 1
- Joined: 2015/04/29 17:37:56
Re: You don't have permission to access /php.php on this ser
I know it's an old thread, but I wanted to add this anyway as it may very well help someone.
I'm running Apache ITK on the server in question and kept getting this in the error log:
Found that there was a VirtualHost which was lacking the AssignUserId directive. So the files were all owned by itkuserxxx:itkuserxxx but apache was running as the default nobody:nobody.
I'm running Apache ITK on the server in question and kept getting this in the error log:
Code: Select all
[Wed Apr 29 11:01:25 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.cgi denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.html denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.html.var denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.htm denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.php denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.phtml denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /index.php3 denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /home.html denied
[Wed Apr 29 11:03:05 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /home.htm denied
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: You don't have permission to access /php.php on this ser
Don't post nonsense to old threads.
Httpd does not run as nobody.nobody.
Httpd does not run as nobody.nobody.