[GLLUG] webdav followup

Scott Henry Harrison harris41 at msu.edu
Thu Jul 14 16:12:03 EDT 2005


Hi, 

>> Also, note, I have had some success setting up WebDAV to handle
>> calendar info to/from iCal.  That may be a reasonable way to go.

> What I would like to know is has anybody been able to get any form of 
> authentication to work with WEBDAV and Apache?

> How did you go about setting that up?

It took a while before I had a few minutes
to compile my previously hastily gathered notes
from 2 months ago into a more readable format.  Here we go.... 


**** Comment on WebDAV and subversion
I've run WebDAV and subversion for a while
and, maybe because of those pre-1.0 days,
I generally prefer the lighterweight
svnserve as opposed to running WebDAV through
apache
http://svnbook.red-bean.com/en/1.0/ch06.html
I would happiest with a subversion/zope
combination, but nobody has really put that together
(http://svn.haxx.se/users/archive-2004-04/0698.shtml).
Of course, WebDAV and subversion may make sense
with MS webfolder clients and other such WebDAV compliant
tools that you want running on top of versioned information
http://svn.haxx.se/users/archive-2005-04/1472.shtml 


**** Web sites that I perused that were helpful
http://www.webdav.org/neon/litmus/
http://forum.textdrive.com/viewtopic.php?id=3035
http://www.twilight-systems.com/flacco/mozcal/mozcal-webdav-apache2-rh9.html
http://www.faqs.org/docs/Linux-HOWTO/Apache-WebDAV-LDAP-HOWTO.html
http://www.oreillynet.com/pub/a/network/2000/11/10/osx_webdav/osx_webdav.htm 
l
http://www.software-documentation.org/apache-webdav-ldap.html
http://www.shawnwall.com/teach/webdav-ical.php
http://wordpress.org/support/topic.php?id=2026 


**** Note #1 ****
# Note, on fedora, you may also need to
# adjust selinux.conf to be permissive
6c6
< SELINUX=permissive
 ---
> SELINUX=enforcing
 

**** Note #2 ****
This snippet may or may not be in your
httpd.conf file already depending on your
distribution and apache installation. 


# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" 
redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully 


Now, let's append "Include conf/webdav1.conf"
to your httpd.conf file, and define the following
as "webdav1.conf"
You'll need to use htpasswd -c to make a passwd.dav
file.... 

**** System requirements
Make sure you have mod_dav.so and mod_dav_fs.so on your system in
the appropriate location.
If not, install the appropriate software package. 


**** WebDAV File below
#
# WebDAV module configuration section.
# 


DAVLockDB /var/lib/dav/lockdb
DAVMinTimeout 600
   <Directory /var/www/html/webdav>
      DAV On
      AuthName "This is my WebDav Connection"
      AuthType Basic
      AllowOverride AuthConfig
      order allow,deny
      allow from all
      Options Indexes
      AuthUserFile /etc/httpd/passwd/passwd.dav
    <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK 
UNLOCK>
      Require valid-user
    </Limit>
   </Directory>
**** end of webdav1.conf 

**** Caveat #1 

webdav+apache directories need a .htaccess file like
/var/www/html/webdav/.htaccess (I changed AccessFileName
to be httest2 for debugging purposes); even if .htaccess
does not add any extra permissions...it currently
appears that the webdav architecture expects there
to be these files in the relevant subdirectories...
(I could be wrong, but that is my hasty recollection) 

**** Caveat #2 

I found weird errors with something like this
at the beginning of my webdav1.conf file:
Alias /webdav/ "/www/DavHome/" 

webdav and apache are "unhappy" with aliasing/rewrite
configurations (which lead to weird shouldnt-be-errors like
"Permission denied: /www/DavHome/.htaccess pcfg_openfile: unable to
check htaccess file, ensure it is readable") 

The .htaccess file was most definitely readable though. 

Whereas if I abandon the Alias /webdav/ /www/DavHome/
strategy and just have a /var/www/html/webdav directory,
everything works. 

So that was disappointing to have a semi-misleading error message,
hence the wild-goose/google-chase of websites at the beginning
of this message;
moral of the story = get a simple system working and then
test more sophisticated configurations (but I think "Alias"
is relatively simple grrr...) 

**** Suggestion = test it 

I recommend you try out litmus. 

http://www.webdav.org/neon/litmus/ 

I installed this tool to diagnose webdav and it works well.
You can run it with this command: 

litmus http://localhost/webdav/ yourpasswddavname yourpasswddavpassword 

output looks cool and exhaustive 

**** Follow-up
Once working, WebDAV to me seems trivial to maintain and rely upon
(doesn't hiccup too much). 

Regards,
Scott 




More information about the linux-user mailing list