  How to use DAV file system on Linux
  Using DAV file system
  SungHun Kim , hunkim@kebi.com Ric Castillo , ric@simp-
  ware.com
  v0.4, 22 Oct 2001

  WebDAV is an acronym for Web-based Distributed Authoring and Version-
  ing. Usually http is a read only protocol, but if you install DAV on
  your web server, it becomes writable. Furthermore, if you use DAVfs,
  you can mount your web server onto your filesystem and can use it as a
  normal disk. This howto document will explain about DAV and DAVfs
  briefly. Also it will show how to install it on your system.

  11..  IInnttrroodduuccttiioonn



  22..  DDAAVV


  22..11..  WWhhaatt iiss DDAAVV??

  Briefly: WebDAV stands for "Web-based Distributed Authoring and
  Versioning". It is a set of extensions to the HTTP protocol which
  allows users to collaboratively edit and manage files on remote web
  servers.

  If you want to know more about DAV, visit this site.
  http://webdav.org/


  22..22..  HHooww ccaann II iinnssttaallll DDAAVV sseerrvveerr

  There are lots of dav client/server programs.  For more information ,
  visit this site.  http://webdav.org/


  33..  DDAAVV ffiilleessyysstteemm

  davfs is a Linux file system driver that allows you to mount a WebDAV
  server as a disk drive.

  WebDAV is an extension to HTTP/0.1 that allows remote collaborative
  authoring of Web resources, defined in RFC 2518.

  davfs allows a remote Web server to be edited using standard
  applications that interact with the file system. For example, a remote
  Web site could be updated in-place using the same development tools
  that initially created the site.

  44..  GGeettttiinngg DDAAVVffss aanndd iinnssttaalllliinngg

  There are two modules needed to install DAVfs. One is a kernel module
  and the other is a set of tools like a mount, cache manager and so on.

  44..11..  GGeettttiinngg DDAAVVffss

  You can download the last version from http://dav.sourceforge.net/

  Unzip and untar the file.

  tar xvfz davfs-x.x.x.tar.gz


  For the rest of the howto we refer to the untared davfs directory as
  $DAVFS.
  44..22..  QQuuiicckk iinnssttaallll

  It's a traditional way.

  ./configure
  make
  su
  make install




  44..33..  IInnssttaalllliinngg kkeerrnneell mmoodduullee

  If you don't have the kernel source, you must download and untar it to
  /usr/src/linux. You can download kernel source from  http://kernel.org

  After install the program, the davfs module will be located in
  /lib/modules/[kernel-version]/fs/davfs.  The module will be
  automatically loaded, when you try to mount.

  If you want to compile and install kernel module, you can do it like
  this.

  cd $DAVFS/davfs
  make
  make install



  44..44..  IInnssttaalllliinngg ddaavvffssdd aanndd mmoouunntt pprrooggrraamm

  You can install the tools in the traditional way.


  ./configure
  make
  su
  make install


  After doing this you will get two binary files in /usr/local/sbin.
  One is the mount program and the other is the client cache manager.
  You may need to add '/usr/local/sbin' in your PATH variable.


  If you want to support SSL, you might need openssl program and --with-
  ssl options.  You can download openssl from   http://www.openssl.org

  A configure program would search /usr/local/ssl and /usr/ssl for
  openssl library. If you installed another directory, you should
  specify the directory as well.

  ./configure --with-ssl=/usr/local/ssl



  Also you can specify the directory of kernel source using --with-
  kernel option. If you have a kernel source in /usr/src/linux-2.4.7,
  you can configure with "--with-kernel=/usr/src/linux-2.4.7"


  55..  CCoonnffiigguurriinngg aanndd ssttaarrttiinngg DDAAVVffss



  55..11..  QQuuiicckk mmoouunntt


  su
  mount.davfs http://dav.simpware.com/ /dav -u hunkim -p 1234
  or
  mount.davfs https://dav.simpware.com/ /dav -u hunkim -p 1234


  That's it. If you want to use SSL, just start your url with https.

  You can use proxy server with a "-c" options. You might need to use
  quotation mark (") to pass a argument.

  mount.davfs http://www.webdav.org/ /dav/ -u hunkim -p 1234 -c "http://proxy.ucsc.edu:8080"



  A mount program will check the cache manager, named davfsd, and if it
  is not available, mount program try to execute the cache manager.


  55..22..  RRuunnnniinngg ccaacchhee mmaannaaggeerr mmaannuuaallllyy

  Simply type davfsd to run the cache manager. If you want to run it at
  boot time, you can add a start-up script. davfs is usually located in
  /usr/local/sbin directory.


  55..33..  MMoouunnttiinngg DDAAVV ffiillee ssyysstteemm

  You need a special mount program to mount davfs. If you installed the
  davfs package it is located in the /usr/local/sbin directory and
  called mount.davfs. The following is a mounting example.

  mount.davfs <full-url with last slash> <mount point> <options>



  su
  mount.davfs http://dav.simpware.com/ /dav -u hunkim -p 1234


  There are three options, -u ,-p and -c. You can use -u to specify user
  id and -p for password. If you want to use a proxy server, you can use
  -c option and specify your proxy server.

  Try df to see the mounted file system. Unfortunately, since we don't
  know how the WebDAV server is set up, the available and used space
  information of DAVfs is fake.

  Now you are ready to navigate the davfs filesystem!


  55..44..  GGrraanntt ooppttiioonn

  As you know, there is no relations between WEB-DAV and local-user. But
  if you want to grant to local user or group, you can use grant
  options, -U for local user and -G for local group.  For example, if
  you want to grant to user, hunkim, you could mount like this:

  mount.davfs http://dav.simpware.com/ /dav -Uhunkim


  Also you could grant to local group as well.

  mount.davfs http://dav.simpware.com/ /dav -Gwebgrp





  66..  TTrroouubbllee sshhoooottiinngg


  66..11..  UUmmoouunntt

  DAVfs works with cache manager using socket. I recommend to umount all
  davfs mounted path, before rebutting your system, even though, cache
  manager will umount all davfs.

  66..22..  SSttooppppiinngg ddaavvffssdd

  You can find the pid of davfsd in /tmp/davfsd.pid and stop in using
  this shell command.

  kill `cat /tmp/davfsd.pid`



  66..33..  CCaacchhee ffiilleess

  Usually, cache files are located in /tmp. File name prefix is
  'dav_cache'. You can delete these files when cache manager is stopped.

  66..44..  LLiinnuuxx kkeerrnneell vveerrssiioonn

  I compiled and tested it on 2.4.x kernel version.

  66..55..  DDAAVV sseerrvveerrss

  I tested it with apache 1.3.x with mod_dav module, apache 2.x and IIS
  5.0


  77..  PPaarrttiicciippaattiioonn

  DAVfs is open source project and everyone can participate this
  project.  For more information, visit our project homepage,
  http://dav.sourceforge.net/






















