You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by tinkee <le...@gmail.com> on 2011/01/05 08:14:49 UTC

[users@httpd] Permission Problem

hi!

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

everytime i open my php files which are on
/var/www/htm/

it gives me the permission denied error.

i think i messed up with the chown and chgrp
i typed all these before this happened:
i think giving root the right to all apache resources. i probably was not
able to do it properly.

------------
  # 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   ->>im not too sure what this
does.
  # chmod -R go-r  /usr/local/apache/logs 
--------------------------------------

 i wanted 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

 It gives me this error:
    Forbidden
    You dont have permission to access /server-status on this server.

  Same error is given when i try to access my http://localhost/ in the
browser:
    Forbidden
    You dont have permission to access / on this server.
    --------------------------------------
   Apache/2.2.3 (Red Hat) Server at localhost Port 80
   

 In the httpd/logs/error.log it gives me these errors:
 
 - (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 know it has something to do with the permission, when i run the httpd it
cannot get through / on the server even.. 

 thank you so much,
tinks


 
-- 
View this message in context: http://old.nabble.com/Permission-Problem-tp30593599p30593599.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] [SOLVED] Re: Permission Problem

Posted by Igor Galić <i....@brainsware.org>.
----- "tinkee" <le...@gmail.com> wrote:

> for the record this problem is fixed..
> thanks to the replies for a similar problem on this forum
> 
> http://old.nabble.com/Fwd%3A-Re%3A--users%40httpd--Apache-2.2.17-on-RHEL-5.2-%2813%29-Permission-denied-td30069032.html
> 
> i was about to get crazy really! :D
> 
> have had two problems that was solved by this helpful forum! 
> thanks heaps!
> 
> godbless you guys! :) 

Thanks for this post (:

Here's for reference what to do with a forbidden:

Look into the error log.

http://onlamp.com/pub/a/apache/2004/04/22/apacheckbk.html

So either it's:
http://wiki.apache.org/httpd/13PermissionDenied

Or:
http://wiki.apache.org/httpd/ClientDeniedByServerConfiguration

> tinkee wrote:
> > 
> > 
> > just additional info, it may help:
> > 
> > User: apache
> > Group apache
> > 
> > i think i changed it to root:root and also
> > the /etc/httpd/ i changed the owner and group to root:root,
> > and then i tried to revert back to apache:apache but its just does
> not
> > work anymore.. 
> > 
> > 
> > 
> > tinkee wrote:
> >> 
> >> hi!
> >> 
> >> i am using apache as my webserver and i have a problem accessing my
> php
> >> files in my browser,
> >> it used to work properly until i think I messed up things.
> >> now i don;t know what to do. T_T
> >> 
> >> everytime i open my php files which are on
> >> /var/www/htm/
> >> 
> >> it gives me the permission denied error.
> >> 
> >> i think i messed up with the chown and chgrp
> >> i typed all these before this happened:
> >> i think giving root the right to all apache resources. i probably
> was not
> >> able to do it properly.
> >> 
> >> ------------
> >>   # 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   ->>im not too sure
> what this
> >> does.
> >>   # chmod -R go-r  /usr/local/apache/logs 
> >> --------------------------------------
> >> 
> >>  i wanted 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
> >> 
> >>  It gives me this error:
> >>     Forbidden
> >>     You dont have permission to access /server-status on this
> server.
> >> 
> >>   Same error is given when i try to access my http://localhost/ in
> the
> >> browser:
> >>     Forbidden
> >>     You dont have permission to access / on this server.
> >>     --------------------------------------
> >>    Apache/2.2.3 (Red Hat) Server at localhost Port 80
> >>    
> >> 
> >>  In the httpd/logs/error.log it gives me these errors:
> >>  
> >>  - (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 know it has something to do with the permission, when i run the
> httpd
> >> it cannot get through / on the server even.. 
> >> 
> >>  thank you so much,
> >> tinks
> >> 
> >> 
> >>  
> >> 
> > 
> > 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Permission-Problem-tp30593599p30593602.html
> Sent from the Apache HTTP Server - Users mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Permission Problem

Posted by tinkee <le...@gmail.com>.

for the record this problem is fixed..
thanks to the replies for a similar problem on this forum

http://old.nabble.com/Fwd%3A-Re%3A--users%40httpd--Apache-2.2.17-on-RHEL-5.2-%2813%29-Permission-denied-td30069032.html

i was about to get crazy really! :D

have had two problems that was solved by this helpful forum! 
thanks heaps!

godbless you guys! :) 




tinkee wrote:
> 
> 
> just additional info, it may help:
> 
> User: apache
> Group apache
> 
> i think i changed it to root:root and also
> the /etc/httpd/ i changed the owner and group to root:root,
> and then i tried to revert back to apache:apache but its just does not
> work anymore.. 
> 
> 
> 
> tinkee wrote:
>> 
>> hi!
>> 
>> i am using apache as my webserver and i have a problem accessing my php
>> files in my browser,
>> it used to work properly until i think I messed up things.
>> now i don;t know what to do. T_T
>> 
>> everytime i open my php files which are on
>> /var/www/htm/
>> 
>> it gives me the permission denied error.
>> 
>> i think i messed up with the chown and chgrp
>> i typed all these before this happened:
>> i think giving root the right to all apache resources. i probably was not
>> able to do it properly.
>> 
>> ------------
>>   # 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   ->>im not too sure what this
>> does.
>>   # chmod -R go-r  /usr/local/apache/logs 
>> --------------------------------------
>> 
>>  i wanted 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
>> 
>>  It gives me this error:
>>     Forbidden
>>     You dont have permission to access /server-status on this server.
>> 
>>   Same error is given when i try to access my http://localhost/ in the
>> browser:
>>     Forbidden
>>     You dont have permission to access / on this server.
>>     --------------------------------------
>>    Apache/2.2.3 (Red Hat) Server at localhost Port 80
>>    
>> 
>>  In the httpd/logs/error.log it gives me these errors:
>>  
>>  - (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 know it has something to do with the permission, when i run the httpd
>> it cannot get through / on the server even.. 
>> 
>>  thank you so much,
>> tinks
>> 
>> 
>>  
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Permission-Problem-tp30593599p30593602.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Permission Problem

Posted by tinkee <le...@gmail.com>.

just additional info, it may help:

User: apache
Group apache

i think i changed it to root:root and also
the /etc/httpd/ i changed the owner and group to root:root,
and then i tried to revert back to apache:apache but its just does not work
anymore.. 



tinkee wrote:
> 
> hi!
> 
> i am using apache as my webserver and i have a problem accessing my php
> files in my browser,
> it used to work properly until i think I messed up things.
> now i don;t know what to do. T_T
> 
> everytime i open my php files which are on
> /var/www/htm/
> 
> it gives me the permission denied error.
> 
> i think i messed up with the chown and chgrp
> i typed all these before this happened:
> i think giving root the right to all apache resources. i probably was not
> able to do it properly.
> 
> ------------
>   # 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   ->>im not too sure what this
> does.
>   # chmod -R go-r  /usr/local/apache/logs 
> --------------------------------------
> 
>  i wanted 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
> 
>  It gives me this error:
>     Forbidden
>     You dont have permission to access /server-status on this server.
> 
>   Same error is given when i try to access my http://localhost/ in the
> browser:
>     Forbidden
>     You dont have permission to access / on this server.
>     --------------------------------------
>    Apache/2.2.3 (Red Hat) Server at localhost Port 80
>    
> 
>  In the httpd/logs/error.log it gives me these errors:
>  
>  - (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 know it has something to do with the permission, when i run the httpd
> it cannot get through / on the server even.. 
> 
>  thank you so much,
> tinks
> 
> 
>  
> 

-- 
View this message in context: http://old.nabble.com/Permission-Problem-tp30593599p30593600.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org