Easy Linux Fileserver With WebDav - page 2

WebDAV and Apache2

March 8, 2011

By
Juliet Kemp

Whilst DAV is usually provided via a webserver, web-browsers aren't a great
way to access it – at the most, you'll get a directory listing (if
you've enabled that in your Apache setup) and read or download files, but not
edit or upload them.

If you want graphical access, the Nautilus and Konqueror file-browsers both
have built-in WebDAV support. Open the folder with
dav://server.example.com/juliet (you'll be challenged for your
username and password), and you should be able to move files back and forth
from your local desktop, and edit them in place. If you have problems, check
the file/directory permissions server-side. KDE Dolphin file manager users should enter webdavs://server.example.com/juliet

Another possible client for WebDAV is cadaver, a command-line
client which works rather like an FTP client. To make a connection, type:

cadaver http://juliet.example.com/myfolder

You'll be challenged for a username and password, then given a command-line
prompt in the specified folder. You can then use get filename and
put filename (or mget and mput) to grab or to
upload files. cadaver also allows you to edit the metadata on files, which Nautilus and Konqueror don't.

You can also use fusedav (available as a package for
Debian/Ubuntu) to access WebDAV directories as part of your normal filesystem. You'll need to add your user to the fuse usergroup
with adduser username fuse (then log out and in again so it takes
effect). Then use

fusedav http://juliet.example.com/myfolder localfolder

to open the remote directory and mount it as localfolder (note that
this directory must already exist.) I had problems getting this to work,
but other people seem to be using it fine.

Other fun with WebDAV

mod_dav_fs, as used above, provides a backend that allows you to
use the server directory system to provide WebDAV files. There are also other
backend providers available – for example, you can use mod_dav_svn
to serve a Subversion repository via Apache. If you do this, you'll need to
load the mod_dav_lock module as well (mod_dav_fs doesn't
need this locking module as it does its own locking). As WebDAV is an open
protocol, there's also scope to do other things with it yourself if you have
particular requirements. It's a useful technology to have in your stable of
file-sharing options.