Apache not authorized to read public_html dir

Apache not authorized to read public_html dir

Post by Mads Skov Hanse » Tue, 01 Jun 1999 04:00:00



Please help. Subj. is driving me nuts!

When browsing to servername/~user/  I get "You are not authorized to view
this page".
My /etc/skel includes the public_html dir, and I have tried adding a

<Directory  /home/*/public_html>
   AllowOverride None
   order deny,allow
   allow from all
</Directory>

in access.conf.
I have already checked that the public_html dir under each user has the 755
access rights.
When enabling 755 access rights to the user dir itself, everything is fine
and the homepages are shown.
I'm running RedHat 5.2.

Help would be much appreciated!!!!!

/Mads Skov Hansen

 
 
 

Apache not authorized to read public_html dir

Post by John Hovel » Wed, 02 Jun 1999 04:00:00


Mads --

I think I see your problem --


> Please help. Subj. is driving me nuts!

> When browsing to servername/~user/  I get "You are not authorized to view
> this page".
> My /etc/skel includes the public_html dir, and I have tried adding a

> <Directory  /home/*/public_html>
>    AllowOverride None
>    order deny,allow
>    allow from all
> </Directory>

> in access.conf.
> I have already checked that the public_html dir under each user has the 755
> access rights.
> When enabling 755 access rights to the user dir itself, everything is fine
> and the homepages are shown.
> I'm running RedHat 5.2.

You need the /home/username to have 755 access rights as well.  (Default RedHat
does not give this.)

Oops... I just read more carefully -- you already figured that out.  This is
annoying.  I don't like to make my user directory world-readable either ;-).

So, create a directory like /usr/web/ and make a subdirectory for each user
there, and set up the conf file accordingly.  Make sure the /usr/web directory
is 755 too ;-).

Good luck!

-John

 
 
 

Apache not authorized to read public_html dir

Post by Geert Alte » Wed, 02 Jun 1999 04:00:00



>> When browsing to servername/~user/  I get "You are not authorized to view
>> this page".
>> My /etc/skel includes the public_html dir, and I have tried adding a

>> <Directory  /home/*/public_html>
>>    AllowOverride None
>>    order deny,allow
>>    allow from all
>> </Directory>

>> in access.conf.
>> I have already checked that the public_html dir under each user has the 755
>> access rights.
>> When enabling 755 access rights to the user dir itself, everything is fine
>> and the homepages are shown.
>> I'm running RedHat 5.2.
>You need the /home/username to have 755 access rights as well.  (Default RedHat
>does not give this.)
>Oops... I just read more carefully -- you already figured that out.  This is
>annoying.  I don't like to make my user directory world-readable either ;-).

You don't need to have the /home/user dir to be "+r" for world, "+x"
(chmod o=x /home/user) would be enough. This works for me (Apache 1.3.6)

Is "mod_userdir" loaded? That could be the case.

HTH,
\Geert.
--

         Finger for PGPkey : Diffie-Hellman 2048/0xC540C550
Spookline (Hi there!) : FBI CIA NSA Scud ICBM VX Iraq DIA DEA EFF PGP

 
 
 

Apache not authorized to read public_html dir

Post by Mads Skov Hanse » Wed, 02 Jun 1999 04:00:00


Thanks for both your advices.
The "mod_userdir" is loaded.
Using 705 access rights solves my problem. That way authorized users cannot
access the homedir, but Apache can show the "public_html" dir. 701 could
perhaps work too.

Now the problem is making a "post user creation schript". It should set 705
access to the userdir after creation of a new user for automation.

I try, by copying the accountarchive.sh file userconf uses, and changing
this to
include a line like "chmod 705 $BASE/&USERID"
It doesent help. Can you help me out on this one also?

/Mads Skov Hansen

Quote:> >You need the /home/username to have 755 access rights as well.  (Default
RedHat
> >does not give this.)
> >Oops... I just read more carefully -- you already figured that out.  This
is
> >annoying.  I don't like to make my user directory world-readable either
;-).

> You don't need to have the /home/user dir to be "+r" for world, "+x"
> (chmod o=x /home/user) would be enough. This works for me (Apache 1.3.6)

> Is "mod_userdir" loaded? That could be the case.