httpd trouble

Christopher K. Johnson ckjohnson at gwi.net
Wed Mar 16 12:13:39 UTC 2005


Mark Weaver wrote:

> Duncan Lithgow wrote:
>
>> The error log says:
>> [Wed Mar 16 08:43:34 2005] [error] [client 127.0.0.1] (13)Permission
>> denied: access to / denied
>>
>> Even index.html doesn't show up! WTF! I've set the directory to 777,
>> I've edited httpd.conf as follows:
>
> Duncan,
>
> the message "403 Forbidden" means that its definitely a permissions 
> problem with the directory where you're attempting to serve pages 
> "from". According to your config file apache is running as user 
> "apache" and group "apache". so, the DocumentRoot and everything 
> beneath it should be owned by apache.apache.
>
>     chown -Rvf apache.apache /home/dulithgow/www
>
> then, your permissions settings, while set to more than necessary at 
> the moment, should be set to 755, or to be more precise:
>
>     all directories: 755
>     .html files    : at least 644
>                          755 preferably
>     cgi-bin dirs   : 755 # if being used
>     cgi progs      : 755
>
And there is another issue with using /home/dulithgow/www - the apache 
user must be able to traverse (the execute bit) /home and 
/home/dulithgow directories before it gets to the /home/dulithgow/www 
directory to read it.  Ordinarily /home mode is 755 so world read and 
execute.  But home directories in it are usually mode 700, thus not 
executable by apache unless apache is the owner.  The best solution if 
you insist on the document root being under your home directory, is the 
chown Mark suggested plus:

chmod o+x /home/dulithgow

-- 

   "Spend less!  Do more!  Go Open Source..." -- Dirigo.net
   Chris Johnson, RHCE #807000448202021




More information about the fedora-list mailing list