# [SOLVED] Apache userdir mod permissions problem

## Smegma

Hello, I've just installed apache2, added -D USERDIR in /etc/conf.d/apache2

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC -D USERDIR -D PHP5"

created public_html dir into my home

permissions:

 *Quote:*   

> 
> 
> drwxr-xr-x  4 root  root   120 Sep 16 17:06 /home/
> 
> drwxr--r-- 66 funky users 3504 Oct 20 17:19 /home/funky/
> ...

 

restarted apache,

but I get a 403 when I try to get localhost/~funky/

You don't have permission to access /~funky/ on this server.

log:

 *Quote:*   

> 
> 
> [Sat Oct 20 19:23:33 2007] [error] [client 127.0.0.1] (13)Permission denied: access to /~funky/ denied
> 
> [Sat Oct 20 19:24:22 2007] [error] [client 127.0.0.1] (13)Permission denied: access to /~funky/index.html denied
> ...

 

The mod_userdir.conf is as it comes by default:

 *Quote:*   

> 
> 
> skunk docs # cat /etc/apache2/modules.d/00_mod_userdir.conf
> 
> # Settings for user home directories
> ...

 

apache version and USE:

 *Quote:*   

> 
> 
>      Installed versions:  2.2.6(2)(12:57:51 10/20/07)(-debug -doc -ldap -mpm-event -mpm-itk -mpm-peruser -mpm-prefork -mpm-worker -no-suexec -selinux ssl -static-modules threads)
> 
> 

 

Any clue about what's wrong?

----------

## Sadako

Should the directories not be owned by the "apache" group?

----------

## Smegma

 *Hopeless wrote:*   

> Should the directories not be owned by the "apache" group?

 

AFAIK, no. Anyway I've already tried it, and doesn't work.

----------

## Sadako

 *Smegma wrote:*   

>  *Hopeless wrote:*   Should the directories not be owned by the "apache" group? 
> 
> AFAIK, no. Anyway I've already tried it, and doesn't work.

 Did you set everything it needs to read to be owned and readable by the apache group, including your home folder?

----------

## Smegma

Arg, I found it,

I needed to set 755 to my /home/user dir, now it works, but I don't like this method, is there any other way to do this?

----------

## Sadako

 *Smegma wrote:*   

> Arg, I found it,
> 
> I needed to set 755 to my /home/user dir, now it works, but I don't like this method, is there any other way to do this?

 Yes, make it owned and readable by the apache group.

 :Razz: 

----------

## Smegma

 *Hopeless wrote:*   

>  *Smegma wrote:*   Arg, I found it,
> 
> I needed to set 755 to my /home/user dir, now it works, but I don't like this method, is there any other way to do this? Yes, make it owned and readable by the apache group.
> 
> 

 

I thought so, but I didn't liked it too, the best solution so far is to set my $HOME to 711.

----------

