I just spent most of today trying to figure this out on my own. So, here's my solution.
First, I assume you've installed the davfs2 package. If you haven't use the following command:
Code:
sudo apt-get install davfs2
By default this package is installed so that only root can mount davfs volumes. To mount as other users, you need to set the SUID bit for /sbin/mount.davfs and designate a group whose members can mount davfs volumes. To set the SUID bit, use this command:
Code:
sudo chmod u+s /sbin/mount.davfs
You then need to configure davfs so that only members of the group "users" can mount davfs volumes. The config file for davfs is: /etc/davfs/davfs.conf Edit however you like, but to use gedit:
Code:
gksudo gedit /etc/davfs2/davfs2.conf
There should be a line something like:
This should be changed to:
Now, you should add your user to the users group:
Code:
sudo addgroup your-user users
Now add something like the following line to your /etc/fstab
Code:
http://<local_server_ip>/dav/sam/ /home/sam/dav davfs rw,user,noauto 0 0
Here, I used your examples for the webDAV server and the mountpoint. davfs is the filesystem type. rw,user,noauto are the options. user is the key option here. It allows users other than root to mount the volume. rw for read/write and noauto means it won't mount on startup.
At this point, I needed to restart my computer before anything would work.
When you get back to the prompt, all you need to do is:
Code:
mount /home/sam/dav
And you should be good to go. If you have any questions, please ask. I'm new to these forums too, but I hope I've explained well.
Bookmarks