Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250900 - www-servers/apache-2.2.9-r1 - mpm-peruser - adding chroot always renders 403 to client
Summary: www-servers/apache-2.2.9-r1 - mpm-peruser - adding chroot always renders 403 ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-14 08:21 UTC by Milos Ivanovic
Modified: 2009-01-01 14:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Ivanovic 2008-12-14 08:21:13 UTC
The Apache peruser MPM doesn't seem to function correctly when specifying a chroot:

httpd.conf:
Processor username group /home/username

vhost:
ServerName example.com
ServerEnvironment username group /home/username

What happens when you browse to example.com? 403 - error log appends:
[Sun Dec 14 20:42:58 2008] [error] [client IP.ADD.RE.SS] client denied by server configuration: /home

It says "/home"? The file requested was /home/username/public_html/index.php
I even tried giving the *whole* home folder including the sub-directories (user folders) 777, it still had the same error. I repeated the same process except this time chowning the folders to the Processor user and group. Still 403, same error.

It only worked for me without the chroot added in the Processor and ServerEnvironment variables, but that's one of the biggest reasons I chose to use peruser (from previously using itk) - to have a sane and "per user" chrooted shared hosting environment.

Reproducible: Always

Steps to Reproduce:
1. Compile Apache with the peruser MPM.
2. Configure your peruser settings.
3. Add "Processor username group /home/username" to httpd.conf.
4. Add "ServerEnvironment username group /home/username" to a vhost.
5. Restart Apache.
6. Visit the URL to the vhost.
7. Be greeted with a 403 -> check logs, will be vague.
Actual Results:  
Error 403: Forbidden, client cannot browse the site.

Expected Results:  
Error 200: Success, client can browse the site under the specified chrooted environment, allowing a sane shared hosting environment.

After endlessly searching for a solution to shared hosting, I found this - and it looks great! Now if I could just get it to work...
Comment 1 Benedikt Böhm (RETIRED) gentoo-dev 2009-01-01 14:02:17 UTC
you need <Directory> directives to allow apache access to directories, chmod 777 does not change anything