Bug#620759: apache2: apache does chroot twice with mod_chroot
>From Stefan Fritsch:
>
> If mod_chroot is not compatible with squeeze's apache, we should
> have it removed from squeeze. Did everything work after you
> removed mod_chroot? Did you have to adjust the configuration?
>
Let me explain what happened. With mod_chroot, the apache did the
chroot twice and (in my case) the original DocumentRoot then has to
be / This is because in lenny my DocumentRoot was the directory
/var/www inside the chroot (/var/www/ too). So the chain is /var/www
(first chroot) -> /var/www/var/www/ (first and second chroot) and then
my files are _not _ found under a third /var/www directory (this would
happen when the DocumentRoot is set to /var/www) but /.
Without mod_chroot the apache changes once to /var/www and my
files are found unter the DocumentRoot /var/www as expected.
So the mod_chroot is working absolutely fine under squeeze.
But together with the builtin chroot the behavior is unexpected and
confusing. Yes, one must change the DocumentRoot when using
mod_chroot ... and maybe some directories in the filesystem
because of the double chroot. But beside of this the mod_chroot
is working perfect. I do not think that mod_chroot needs to be
removed from squeeze but the documentation in /usr/share/doc/
mod-chroot-common/ should give a hint about this possible trouble
source.
Stephan
Reply to: