WebDAV
I’ve recently started using WebDAV to share files with a colleague at another University, for a joint project. Not a big deal, really. There are lots of ways to share files, including emailing them back and forth.
But the integration of WebDAV support in the MacOSX Finder is particularly nice. With a couple of mouseclicks, he can mount the shared DAV directory on his Desktop, double-click on files to open them, drag&drop files to/from his own hard drive. The Finder takes care to warn him if he attempts to overwrite a newer version of a file in the DAV directory. And the WebDAV protocol takes care of file-locking etc.
To set up a shared DAV directory, I needed to
- Create a directory, owned by
www
. - Configure the webserver to use that directory as a DAV share
<Directory /Users/distler/Sites/[sS][oO][mM][eE][dD][iI][rR]> DAV On AuthType Digest AuthDigestFile /usr/local/apache2/var/davusers AuthDigestGroupFile /usr/local/apache2/var/davgroups AuthDigestDomain /~distler/somedir/ AuthName "dav" AllowOverride None Options FollowSymLinks Indexes require group youcantoo </Directory>
- Create a digest password for my colleague, using
htdigest
. - Add him to the appropriate group in
/usr/local/apache2/var/davgroups
.
Connecting to the server is as simple as hitting ⌘ -K in the Finder, typing in the URL (the Finder remembers recently-accessed URLs), and entering a password (which can be stored in the Keychain).
Sweet!
Posted by distler at April 18, 2005 9:23 AM
Re: WebDAV
The right way to do this would of course be a CVS (or friends) repository: Automatic versioning and merges if possible. The only problem is, how do you convince your colleagues to learn how to use it.
Or for that matter, how do you convince some unnamed faculty member to use the computer at all. I’m now back to implementing the handwritten corrections…
PS: As more web servers are going to run with selinux, one also has to make sure that the security context of the directory allows the web server access, e.g. fedora: “chcon -t httpd_user_content_t www”