Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache userdir permission denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Mon Apr 28, 2008 10:19 pm    Post subject: apache userdir permission denied Reply with quote

Sorry for this post, it's probably something that one should figure out oneself :oops:. Something in my brain seems to be blocked, though.
Whenever I try to access my localhost user directory, I get a 403 permission denied.

This is the relevant part of my httpd.conf:
Code:
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
...
Include /etc/apache2/modules.d/*.conf

And here's /etc/apache2/modules.d/00_mod_userdir.conf:
Code:
<IfDefine USERDIR>
<IfModule userdir_module>

UserDir HTMLs

<Directory /home/*/HTMLs>
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
     AllowOverride FileInfo AuthConfig Indexes
        Order allow,deny
        Allow from all
        <Limit GET POST OPTIONS>
                Order allow,deny
                Allow from localhost
        </Limit>
        <LimitExcept GET POST OPTIONS>
                Order deny,allow
                Deny from all
        </LimitExcept>
</Directory>

<IfDefine SUEXEC>
<IfModule suexec_module>
<Directory /home/*/HTMLs/cgi-bin>
        Options ExecCGI
        SetHandler cgi-script
</Directory>
</IfModule>
</IfDefine>

</IfModule>
</IfDefine>

And yes, /etc/conf.d/apache2 does have "-D USERDIR" in APACHE2_OPTS.

Note that this does even happen when I change /etc/apache2/modules.d/00_default_settings.conf from:
Code:
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
</Directory>
to
Code:
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>
:?: :?:
Thanks for your help.
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Tue Apr 29, 2008 5:30 am    Post subject: Reply with quote

Start apache thusly:
Code:
/etc/init.d/apache2 start
The onlything you should need to do to your setup to get it running at a basic level is add your server name at the end of /etc/apache2/httpd.conf. Save the "fancy" file editing for after you get apache running.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Wed Apr 30, 2008 6:44 am    Post subject: Reply with quote

thanks for your answer, pappy_mcfae.
My apache is up and running when I get those "permission denied" errors. In fact, I can access everything under /var/www/localhost/htdocs, but not the userdirectories under /home/username/public_html (or .../HTMLs, in my case). I don't understand why.
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Wed Apr 30, 2008 7:22 am    Post subject: Reply with quote

It's probably a virtual host problem and/or file permissions, but I can't say for certain. I play with apache a little bit. I don't know it in and out. I'm sure someone else will be along to help you out in that area.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Mon May 05, 2008 4:05 pm    Post subject: Reply with quote

Any help?
I spent one more day trying to fix this, I can do what I want, e.g. changing "UserDir HTMLs" to "UserDir public_html" or even "UserDir http://another_machine/home/", each time creating the necessary directories, but no avail.

BTW, independent of what I do,
tail /var/log/apache2/error_log wrote:
[Mon May 05 17:40:58 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g PHP/5.2.5-pl1-gentoo configured -- resuming normal operations
[Mon May 05 17:41:01 2008] [error] [client 127.0.0.1] (13)Permission denied: access to /~cjubon/ denied
whenever I try to access http://localhost/~cjubon/. This worked fine with earlier versions.

It seems to me that apache does not translate the path at all. Can this be a bug?

Once more, apart from that, apache works fine, but this one is really annoying.

I'd appreciate your help very much.
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
nbennett
n00b
n00b


Joined: 31 Oct 2007
Posts: 8

PostPosted: Mon May 05, 2008 5:22 pm    Post subject: Reply with quote

I'm gonna agree with the above post. What are the directory permissions? Does the daemon have read access to it?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum