[Cialug] webdav
Matthew Nuzum
newz at bearfruit.org
Mon Oct 29 15:13:01 CDT 2007
I've setup a shared folder using webdav. It works fine when I try to
access it (though there wre some gotcha's involved), but when someone
tries to use it from Windows its a no go. They just get prompted for
the username/password again and again.
First step was to create a standard webdav share called uploads. This
worked fine both in Windows and Linux.
Then we wanted a share to access the whole site. We wanted to access
it using the folder /website. It took some trial and error to get this
working, but it finally turned out that this configuration got the job
done:
sudo mkdir /srv/web2/web/website
sudo chown www-data /srv/web2/web/website # don't know if this is needed
## In apache config file for my site, I added these lines:
Alias /website/ "/srv/web2/"
<Location /website>
Dav On
AuthName "Site Admin"
AuthType Basic
AuthUserFile /srv/web2/.htpasswd
## Limit access for enhanced security
<LimitExcept GET HEAD OPTIONS POST>
require valid-user
</LimitExcept>
Order allow,deny
Allow from all
</Location>
You'd think that it would be unnecessary to do the mkdir ..../website
but before doing that apache log had errors about
/srv/web2/www/website folder not beign found. As soon as I created
that folder I could access it using GNOME's vfs.
But Windows "Network Places" feature still doesn't see it. It just
asks you to login again and again.
If I comment out the <LimitExcept, require valid-user, and
</LimitExcept lines then it works (but there's no authentication).
Also, if I remove the Alias it works.
This configuration works fine in both Windows and Linux:
<Directory "/srv/web2/www/plogger/uploads/">
Dav On
AuthName "Pictures Uploader"
AuthType Basic
AuthUserFile /etc/apache2/.htpasswd
## Limit access for enhanced security
<LimitExcept GET HEAD OPTIONS POST>
require valid-user
</LimitExcept>
Order allow,deny
Allow from all
</Directory>
When Windows tries and fails to login, I get nothing in the error.log
(but if I type the password wrong from Linux, I do get an entry in the
error.log saying password mismatch). The entry in the access.log looks
like this:
123.123.123.123 - - [29/Oct/2007:14:38:37 -0500] "PROPFIND /website
HTTP/1.1" 401 1190 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
I'm mystified, anyone have any suggestions?
--
Matthew Nuzum
newz2000 on freenode
More information about the Cialug
mailing list