Require user $var

Require user $var

am 06.10.2010 16:47:44 von Gary Webster

Hello.

I have directories:
/var/www/html/project/mary
/var/www/html/project/joe
/var/www/html/project/john
/var/www/html/project/fred
..
..

How do I accomplish something like:

AuthName "project"
AuthType Basic
AuthBasicProvider dbm
AuthDBMUserFile whatever
Require user $user


rather than having a separate section for each user in
httpd.conf ?

Thanks.


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Require user $var

am 06.10.2010 17:08:08 von Nick Kew

On Wed, 6 Oct 2010 10:47:44 -0400
Gary Webster wrote:

> How do I accomplish something like:

The easy tool for this kind of thing is mod_macro:
http://cri.ensmp.fr/~coelho/mod_macro/

If third-party modules are a problem (e.g. due to a
troublesome boss), there's a dirty approach. Create a
wildcarded section allowing any user with a project directory.
Then use a RewriteCond to capture username and a
rewriterule to send them to their own space.

--
Nick Kew

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Require user $var

am 06.10.2010 17:15:27 von Nick Kew

On Wed, 6 Oct 2010 16:08:08 +0100
Nick Kew wrote:

> On Wed, 6 Oct 2010 10:47:44 -0400
> Gary Webster wrote:
>
> > How do I accomplish something like:
>
> The easy tool for this

Dammit, just overlooked the really easy ...

Require file-owner

which should be ideal since you don't have
multiple authn files.

--
Nick Kew

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Require user $var

am 07.10.2010 13:18:46 von Mark Watts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/06/2010 04:15 PM, Nick Kew wrote:
> On Wed, 6 Oct 2010 16:08:08 +0100
> Nick Kew wrote:
>
>> On Wed, 6 Oct 2010 10:47:44 -0400
>> Gary Webster wrote:
>>
>>> How do I accomplish something like:
>>
>> The easy tool for this
>
> Dammit, just overlooked the really easy ...
>
> Require file-owner
>
> which should be ideal since you don't have
> multiple authn files.
>

This isn't documented syntax; is it a 2.3 thing?

http://httpd.apache.org/docs/current/mod/core.html#require

- --
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, IPR Secure Managed Hosting
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkytrJYACgkQBn4EFUVUIO0SHgCZAe/rSBGDCTkfIjfSdeZY ruY2
8kwAoKIgoGyn6IU+1I/J9DIt60/Wzvef
=REZv
-----END PGP SIGNATURE-----

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Require user $var

am 07.10.2010 13:36:10 von Joost de Heer

>> Require file-owner

> This isn't documented syntax; is it a 2.3 thing?

Ne, it's a mod_authz_owner thing:
http://httpd.apache.org/docs/2.2/mod/mod_authz_owner.html

Joost

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org