Forum Moderators: phranque

Message Too Old, No Replies

Apache WebDav setup

WebDav to read/write to their directory but not others

         

goodguy

7:45 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



Hi, I need a little help configuring Apache to limit specific users to specific locations. Allowing each user to use WebDav to read/write to their directory but not others. I am not sure how the user authentication in this scenario works.

<Location /bobs>
DAV On
AllowOverride None
Options None
<LimitExcept GET HEAD OPTIONS>
require user bob
</LimitExcept>
</Location>

/bobs is located /var/www/html/bobs
I have WebDav working but when I add LimitExcept it breaks.
Using Fedora2 “latest yum update” mod_dav 1.0.8-1

jdMorgan

8:13 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



goodguy,

Welcome to WebmasterWorld!

What version of Apache are you on? LimitExcept is only available in 1.3.5 and later.

Also, Require can only be used in <Directory> containers and/or in .htaccess, so I suspect that this is the real problem.

Jim

goodguy

11:55 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



Well I am using apache 2.0.49.
I may have read the mod_dav Installation file wrong but this is taken right from the book so to speak.

[webdav.org...]

If this is no good then can you suggest a better way to go about it?

jdMorgan

1:35 am on Oct 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't have any special knowledge of this module, just working from the book...

Make sure you have Allow Override all or at a minimum, AllowOverride Limit set in order to allow use of Limit and LimitExcept.

This is the second inconsistency in the document you cited; <LimitExcept> is not supposed to work in a <Location> container, and they say to set AllowOverride None, which would disable the Limit directives...

Maybe someone who knows more about this stuff can be of more help.

Jim

goodguy

4:14 am on Oct 14, 2004 (gmt 0)

10+ Year Member



Ok looks like I found a solution. I created a htpassword file with user webdav. Not my idea [serverwatch.com...]

<Location /bobs>
DAV On
AuthType Basic
AuthName "WebDAV Restricted"
AuthUserFile /var/www/html/bobs/.DAVlogin
<LimitExcept GET HEAD OPTIONS>
Require user webdav
</LimitExcept>
</Location>

P.S. any suggestions on how to restrict or track space usage in these directories

Thanks for the help Jim