"Scott Alexander" <[EMAIL PROTECTED]> wrote:
>On 1 Jan 2001, at 11:40, James G Smith wrote:
>
>Thanks for the answer. I'm no mod_perl or apache guru but I had a
>feeling it didn't make sense.
>
>I'm trying to use a Apache::AuthAnyModDav to authenticate for
>mod_dav.
>
>I already have a Apache::AuthAny for normal authentication which
>works fine.
>
>I'd like to have it so a user can use Web folders in Win 98 and
>connect to a directory on the web server. But only their own
>directory. I can get it to work via authentication but that is any user
>can access any directory in the tree. I want that they can only
>access their own directory.
>
>At the moment users can upload, download to their own directory via
>a html interface but to add WebDav functionality would be great!
Ahh... Now we get into the interesting bits of mod_perl. There
is a way to change the DocumentRoot on a per-request basis. Just
not a way to do this in the config files.
Use the function Apache::document_root. For example:
my $old_docroot = $r -> document_root($new_docroot);
$r -> register_cleanup(sub { shift -> document_root($old_docroot) } );
The new document root will be available as (the scalar)
$Apache::Server::DocumentRoot .
This is based on information from several months ago. I haven't
actually tested it, but I think Doug said it should work back
then (v. 1.23).
You might be able to put this in you authentication handler. If
you get something working with this, let us know.
------------------------------------+-----------------------------------------
James Smith - [EMAIL PROTECTED] | http://www.jamesmith.com/
[EMAIL PROTECTED] | http://sourcegarden.org/
[EMAIL PROTECTED] | http://cis.tamu.edu/systems/opensystems/
------------------------------------+------------------------------------------