Make Mac Work:

Helping Manage The Macintosh Enterprise

CreativeTechs

Share Files Through WebDAV

Your biggest client’s firewall blocks FTP, your Macs can’t follow Outlook’s backslash-style file links, and that hotel promising “free internet in every room” really only offers web browsing. So how can co-workers trade information from diverse locations, update their calendars from on the road, or just exchange file addresses for multiple operating systems? It can be difficult to find an easily accessible, relatively secure, and fully cross-platform method to host shared documents.

WebDAV (Distributed Authoring and Versioning) meets all three criteria, allowing authorized users to read and write network files natively from both Macintosh and Windows systems. Packaged as a set of web extensions built directly into Mac OS X Server, it’s designed to allow transfer of a wide range of data using only standard web ports and protocols. It’s also extremely easy to set up, requiring nothing more than the graphical server administration tool.

WebDAV Setup: Modules

Open Server Admin on the machine you’d like to host shared files, then select the “Web” service from the list down the left hand side and “Settings” from the toolbar above. Choose “Modules” from the row of buttons on the right, and scroll down the window until you find dav_module. It should be enabled by default, but if it isn’t, do so using the check box to the left. Then click the “Save” button at the bottom right.

Now click the “Sites” option from the toolbar. Just click the plus sign at the bottom left, and the window will offer the configuration options for your new domain.

WebDAV Setup: General

In this instance we’re hosting only the sub-domain webdav for the larger example.com domain. The default settings will suit most purposes, though you may wish to change the “Web folder” setting if you’d like to store your documents in another location. If you do so, be sure the new directory is owned by the web server’s user and group www, and that read and write permissions are enabled for both.

Next, in the “Options” pane, check “WebDAV” from the list of features, then move on to the “Realms” pane where you’ll set access controls to your site.

WebDAV Setup: Realms

Click the plus sign in the bottom left to create a new realm, which will define the security settings on your network share. You can name the realm anything you like, but be sure to choose “Digest” as the “Authorization” method (as it provides the best balance of security and support for general use), and that the “Folder” setting matches the “Web Folder” you chose in the “General” preferences pane. This approach won’t encrypt all the data transfered, but it will use the Mac OS X encrypted password mechanism to prevent unauthorized access.

Now click the “Users & Groups” button at the bottom right, and select the pre-existing users and groups you’d like to allow access to the WebDAV realm (or create them in Workgroup Manager if they don’t yet exist, then add them here when you’re done). Select the appropriate permissions using the “Can Browse” (read) and “Can Author” (write) check boxes, then uncheck those boxes for the built-in “Everyone” user (unless you’d like the whole world to have access to your files).

With all your settings configured, click “Save”, then use the rounded “back” button at the top to return to the “Sites” pane. Check the “Enabled” box to the left of your new domain, then click the big green “Start Service” button at the top of the window. Your server should now allow reading and writing documents over a normal web connection.

To attach to your new file share from a Macintosh client, simply select “Connect to Server…” from the “Go” menu in the Finder. Type in the full internet URL for the WebDAV realm, in this case http://webdav.example.com, and hit “Connect”. You’ll be asked for a username and password, after which the share will mount on your desktop like any other network volume. The procedure is even easier from Windows XP and Vista, where you can simply type the URL into any Explorer address bar.

With your WebDAV-enabled site online, your users can exchange large files, publish and subscribe to iCal calendars, and collaborate on remote documents using nothing but a World Wide Web connection.