httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Matrosov <>
Subject [users@httpd] mod_userdir resets global per-user permissions, if UserDir was redefined in VirtualHost
Date Tue, 26 Feb 2013 11:59:50 GMT

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

# cat sites-enabled/000-default:
<VirtualHost *:80>
    DocumentRoot    /var/www

# cat sites-enabled/local-test:
<VirtualHost *:80>
    ServerName      wiki.localhost
    DocumentRoot    /var/www/wiki

    UserDir         /home/Public/*/www/wiki

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)...
Connecting to localhost (localhost)||: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?

    Dmitriy Matrosov

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message