Search:  
Gentoo Wiki

HOWTO_Webdav_Mount


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

Introduction

Instead of relying on the virtual filesystems like webdav:// in KDE, it is possible to mount webdav directly to your filesystem.

Kernel Support

You will need the coda support to your kernel. The genkernel already has it. Try modprobe coda For anyone who does not have the modules, it is under Filesystems --> Network file systems. ()

Note: davfs2 should also work with fuse if coda is not available

Steps

Next you will need to emerge davfs2 or emerge net-fs/davfs2. davfs2 uses net-misc/neon library, so neon will be installed if you do not have it.

Then just mount -t davfs http://example.com/dav /mnt/dav

You may want to look at the options in /etc/davfs2/davfs2.conf and/or edit the URL locations in /etc/davfs2/secrets to save passwords.

User Based Mounting

The user and group davfs2 will need to exist, the user you want to mount with will need to be in the davfs2 group.

Then copy /etc/davfs2/davfs2.conf into ~/.davfs2/, create the secrets file touch ~/.davfs2/secrets (for security) or copy it from /etc/davfs2/ (as root), and chmod 600 ~/.davfs2/secrets.

Finally you need to allow the user to mount the directory by adding a new entry to fstab

File: /etc/fstab
http://example.com/dav  /mnt/dav  davfs  noauto,rw,users  0 0

That should do it, just run mount /mnt/dav.

Other Programs

Both Konqueror and Nautilus have built in support for webdav.
In Konqueror just type webdav:// for http or webdavs:// for https.
In Nautilus use normal urls, ie http://

Links

Project page http://dav.sourceforge.net/
Nice guide http://plone.org/documentation/how-to/webdav

Troubleshooting

Unable to mount as user

If you get

$ mount webdav-dir
sbin/mount.davfs: You can't mount into another users home directory.
"/" is the home directory of nobody.

while trying to mount as ordinary user, simply trust this error message. Nobody owns your root as its homedir, as you can see in /etc/passwd. Change nobodys homedir to get it work.

# usermod --home /nonexistent nobody
or
# usermod --home /dev/null nobody

I don't know why nobody has / as its homedir in Gentoo. Maybe deamons know. I found this discussion http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=135732 and it seems that / is tratidional [sunos4, solaris...], BSD's use /nonexistent.

Retrieved from "http://www.gentoo-wiki.info/WebDAV"

Last modified: Fri, 05 Sep 2008 09:20:00 +0000 Hits: 10,927