WebDAV mounting under Linux

by

There is a tool that allows to locally mount remote DAV repositories under Linux, so it appears in the local directory tree. http://dav.sourceforge.net/

I had a really hard time trying to sort out how to make it work, given the scarce information, somethimes in contradiction with the actual system behavior. So this is a minimalistic procedure to get it running.

Note: This was on Mandriva Linux 2007. Our tutorial is aimed at mounting WebDAV URL https://dav.test.com/share/ by a simple user (« username ») so that he can actually upload files on server.

In procedures below we use # to note commands to be run as root and $ for UserName’s commands.

Preparation

  1. Install davfs2 package
  2. # modprobe coda

Test root mounting

  1. # mkdir /mnt/DAV
  2. # mount.davfs2 https://dav.test.com/share/ /mnt/DAV
  3. You should now be able to browse the /mnt/DAV and alter files in there. If not verify your server configuration.
  4. # umount /mnt/DAV

Important: There must be no « / » at end of URL. Note that if you use an alias on the http server for this WebDAV repository, it must not have an ending « / » on the server configuration file….
Allow users to mount the repository

  1. Add username to the users group, and relog it if needed
  2. $ mkdir ~/.davfs2/ ~/mnt/DAV/
  3. # cp /etc/davfs2/secrets ~username/.davfs2/
  4. # chown username: ~username/.davfs2/secrets
  5. Add the credentials to ~username/.davfs2/secrets following comments in there:
    https://dav.test.com/share username SeCret
  6. As root add the following line in /etc/fstab:
    https://dav.test.com/share /home/username/mnt/DAV/ davfs2 user,noauto 0 0

That done, UserName should be able to mount the repository using:

mount /home/username/mnt/DAV/

Publicités

12 Réponses to “WebDAV mounting under Linux”

  1. superk Says:

    OK I’ll try that tonite 🙂

  2. Julian Says:

    Totally works. Excellent, and thank you kindly.

    Julian

  3. Talkwards » Blog Archive » links for 2008-11-29 Says:

    […] WebDAV mounting under Linux « Cam’s Blog, yes Sir There is a tool that allows to locally mount remote DAV repositories under Linux, so it appears in the local directory tree. (tags: tutorial webdav) […]

  4. Alex Says:

    Hi,

    I am able to mount it but I am gettin hundreds of following error

    mount.davfs: open files exceed max cache size by 1653 MiBytes

    Thanks in advance.

  5. ab Says:

    I found this page because of error « mount.davfs: open files exceed max cache size »…
    I also use davfs (to backup files every night to mediacenter of gmx). I also have a huge amount of these errors. Any idea?
    Alex, did you find a solution?

  6. BASTA! Says:

    Alex, ab – same problem here.

  7. Matthew Says:

    Thanks. I had to do this too for Fedora 8:

    sudo groupadd davfs2
    sudo useradd davfs2 -g davfs2

  8. Luis Flores Says:

    Camille,

    Just by the way, command 2 for testing the mount works without the 2 the command is mount.davfs not mount mount.davfs2

  9. sumit Says:

    is there any way for non-root user to pass username and passoword to the command itself ? I tried :

    mount -t davfs http://localhost:8080/alfresco/webdav /tmp/webdav/
    -o username=XXX, password=XXX

    but it did not work.

  10. Cos’è WebDAV utilizzo in linux ubuntu di web share | maurizio siagri Says:

    […] WebDAV mounting under Linux | Cam’s Blog, yes Sir […]

  11. WebDAV ubuntu | random blurbs Says:

    […] WebDAV ubuntu […]

  12. theoutpost.org Says:

    Mounting a WebDav Share In Linux

    Will clean up this post when i get a chanceapt-get install davfs2Remote filesystems should not be indexed, so you should exclude the /dfs directory from the updatedb command:edit /etc/cron.daily/slocate.cron and add the /dfs directory in the list of ex…

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s


%d blogueurs aiment cette page :