LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices


By xjlittle at 2007-03-14 10:29
Webdav is probably one of the most useful tools that I have ever used. It allows you to open and edit documents directly on a webserver. Windows users know this as web folders. There used to be a internet company called X drive but I don't know if they still exist.

Davfs complements this ability on Linux by allowing you to mount the webdav folder as if it is a local drive. This is necessary as some applications, notably OpenOffice and Lotus Notes, will not save to a url. They must have a mounted folder where they save the document.

This how to explains how to set up davfs using the package from the Ubuntu repositories. This was done on edgy.

Step 1.
Get the package:
Code:
sudo apt-get install davfs2
Step 2.
Ubuntu does not install the package suid so it must be reconfigured:
sudo dpgk-reconfigure davfs2
Choose yes on the first screen to set the applicaton to suid root.

The second screen will ask you about a group for the davfs users. You can accept the default or change this. Be sure and make a note of what you use.

The third and final screen simply gives you some instructions. Hit enter to go back the the shell

Step 3.
Now we have to edit /etc/davfs2/davfs2.conf Find the line that has
dav_group $group
and change the $group to the group that you used in the dpkg-reconfigure command.

Step 4.
Edit /etc/fstab and create the directory where you want to mount your webdav folder. I mount mine in my home directory under the folders mnt/mydocs so the complete path is /home/me/mnt/mydocs. Go ahead and make these directories if they do not exist:
sudo mkdir -p /home/yourusername/mnt/mydocs

Open /etc/fstab for editing and add a line that looks like the following. Make sure it matches your desired directory structure and not mine:
sudo vim /etc/fstab
and add something like the following:
https://me.mydocs.myorg.org:8443 /home/me/mnt/mydocs davfs rw,noauto,user 0 0

Step 5:
You should be able to mount the directory as a normal user:
me@ubu610-lt:~$ mount mnt/mydocs

Please enter the username to authenticate with server
https://me.mydocs.myorg.org:8443
or hit enter for none.
Username: me

Please enter the password to authenticate HENDRICKS+me with server
https://me.mydocs.myorg.org:8443
or hit enter for none.
Password:
me@ubu610-lt:~$

Note that you will not get a username/password prompt if your dav folder is not set up for this on the server. I also was in my home directory so I used the relative path for mounting. Use the full path if necessary.

Step 6:
Check the mount:
me@ubu610-lt:~$ mount
/dev/sda3 on / type ext3 (rw,errors=remount-ro)
/dev/sda1 on /boot type ext2 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
https://me.mydocs.myorg.org:8443 on /home/me/mnt/mydocs type coda (user=me)
me@ubu610-lt:~$

Notice the next to last line is the webdav server that we put into /etc/fstab.

Voila! You should now be able to open the mounted directory from any application and open/edit/save documents in this folder as if it were on your local machine.

Enjoy!
John


  



All times are GMT -5. The time now is 03:24 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration