Davfs2

Last modified by Vincent Massol on 2016/02/04 09:54

As the name suggests, davfs2 is a file system driver for Linux that can mount remote WebDAV shares into your local file system. Installing & configuring davfs2 can be a little bit difficult for an inexperienced individual; please seek assistance if you think you can't handle it by yourself. The following steps were tested on a Fedora 9 system, you might have to do some tweaking depending on your specific Linux distribution:

  • Download the source distribution of davfs2 here.
  • Compile and install davfs2 with the following (usual) command sequence:
    $ cd <dvafs2-src-dir>
    $ ./configure
    $ make
    $ make install //requires root privileges.

    If the configuration script fails complaining about a missing library, use your package manager (like yum) to find and install the required packages. In my case I had to install the neon.i386 and the neon-devel.i386 packages.

  • Next, open the davfs2 configuration file /usr/local/etc/davfs2/davfs2.conf and set the following option: delay_upload    0.
  • Once you have installed and configured davfs2 correctly, execute the following command with root privileges:
    $ mount -t davfs http://<xwikihost>[:port]/xwiki/webdav <mount-point>

    If this command fails complaining about a missing user or group named davfs2, create a user (+group) named davfs2 and try again.

  • If everything goes ok, the above command will mount the remote WebDAV share as shown below:

    mount.png

  • Now you should be able to browse your XWiki server as shown below:

    browse.png

Configuring Editors

There are a few more configurations you need to make in order to be able to edit & save wiki files and attachments through davfs2. This requirement arises from the fact that some editors (gedit, vim etc.) use temporary backup files to store intermediate data. These temporary backup files cause a lot of confusion to the server and hence you need to turn them off in your favourite editor (most editors have an option to do this) while accessing files over WebDAV.

  • For gedit you can use the Edit->Preferences->Editor(Tab) to accomplish this as shown below:
    gedit.png
  • For the vim editor you have to use following options in your ~/.vmrc file:
    set nobackup
    set nowritebackup
    set dir=~

Similarly you will have to find appropriate settings for your favourite editor.

Tags:
    

Get Connected