WebDav and fstab

This page has moved.  Please update your links:
http://linuxsagas.digitaleagle.net/2008/09/09/webdav-and-fstab/

We have a webdav enabled web site that I wanted to connect to on a regular basis.  I wanted it to mount on my filesystem as opposed to just using it in nautilus so that I could use meld to copy files to it.

So, I added a line to the end of /etc/fstab   (sudo gvim /etc/fstab):

https://mywebsite/~docs    /dir/to/mount/on    davfs    user,noauto,rw    0    0

Then, I added the following line to /etc/davfs2/secrets:

https://mywebsite/~docs    myusername    mypassword

Originally, I had just the unsecure http:// url.  But, it gave me this error:

/sbin/mount.davfs: Mounting failed.
401 Unauthorized

I fixed it by changing the urls to https://.

When I mounted it as root, it worked fine.  But, when I mounted it as my regular user, I got this message:

/sbin/mount.davfs: program is not setuid root

To fix it, I had to run this command:

sudo chmod u+s /sbin/mount.davfs

Then, I changed the file /etc/davfs2/davfs2.conf.  I changed the dav_group setting.  For me, I found a line that said “dav_group staff”.  I replaced staff with my username, which is my default group.  The thread I read mentioned using the users group.

Resources

Advertisements
Posted in How To. 5 Comments »

5 Responses to “WebDav and fstab”

  1. Conner Says:

    Thanks!

  2. 2010 in review « Linux Sagas Says:

    […] WebDav and fstab September 2008 2 comments 5 […]

  3. debian Says:

    to fix the error with the setuid you can run “dpkg-reconfigure davfs2”

    it’s an option during the package installation but you don’t get to see it (would have to bump up verbosity)

    see here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573241


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: