On Tue, Feb 26, 2013 at 6:59 AM, Dmitriy Matrosov <sgf.dma@xxxxxxxxx> wrote: > Hi. > > I try to set up mod_userdir on Debian Wheezy and i discovered, that if > i redefine some parameters of UserDir (e.g. path) inside VirtualHost, > all per-user permissions (enabled/disabled state for particular user) > set at "main server" level will be reset to "default permission" > (disabled or enabled for all) for this VirtualHost. Here is example > (it uses Debian config layout): > > # grep apache2.conf -ne '^Include' > 244:Include mods-enabled/*.load > 245:Include mods-enabled/*.conf > 248:Include ports.conf > 265:Include conf.d-enabled/ > 268:Include sites-enabled/ > > # cat mods-enabled/userdir.conf: > <IfModule mod_userdir.c> > UserDir /home/Public/*/www > UserDir enabled > UserDir disabled root > </IfModule> > > # cat sites-enabled/000-default: > <VirtualHost *:80> > DocumentRoot /var/www > </VirtualHost> > > # cat sites-enabled/local-test: > <VirtualHost *:80> > ServerName wiki.localhost > DocumentRoot /var/www/wiki > > UserDir /home/Public/*/www/wiki > </VirtualHost> > > Here is directory layout: > > # sudo -u www-data sh -c 'for f; do echo "File is \"$f\":"; cat "$f"; > done' sh /home/Public/{sgf,root}/www/{wiki,}/index.html > > File is "/home/Public/sgf/www/wiki/index.html": > Here is sgf's public WIKI directory. > File is "/home/Public/sgf/www//index.html": > Here is sgf's public www directory. > File is "/home/Public/root/www/wiki/index.html": > Root's public WIKI dir. > File is "/home/Public/root/www//index.html": > Root's public www dir. > > And here is test: > > # wget --quiet -O- localhost/~sgf > Here is sgf's public www directory. > # wget -O- localhost/~root > --2013-02-18 15:10:18-- http://localhost/~root > Resolving localhost (localhost)... 127.0.0.1 > Connecting to localhost (localhost)|127.0.0.1|:80... connected. > HTTP request sent, awaiting response... 404 Not Found > 2013-02-18 15:10:18 ERROR 404: Not Found. > > # wget --quiet -O- wiki.localhost/~sgf > Here is sgf's public WIKI directory. > # wget --quiet -O- wiki.localhost/~root > Root's public WIKI dir. > > As you may see, 'disabled root' statement is ignored by Virtual Host > 'wiki.localhost', which has redefined UserDir path. > > So, i want to ask whether this a bug or intended behavior? Different modules merge their configurations in different ways. If it wasn't for backwards compat, merging these would be ideal. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx