Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

If you want to use webdav space with Linux there exist various ways to connect this space to a Linux system.

 
1) wdfs - Very easy to use. It's a simple command line and then you can access the webdav space from a console or any filemanager.
2) davfs - You have to configure this first. Then you can use it the same way as wdfs. The way it's used by Linux is identical to the other spaces like disks, nfs, smbfs which are used as filesystems in Linux. davfs is my suggested way to use webdav in Linux.
3) cadaver - Works similar like a ftp or smb client on the command line
4) gvfs - Gnome virtual Filesystem
 
There exist variouse filemanagers like dolphin and krusader which offer their own way to connect to a webdav space. If you use wdfs or davfs you can easily use these filemanagers to work with webdav space transparently by a mount point.
 
I personaly use davfs because the webdav space is used the same way in Linux like all other space is managed. I can use my dolphin or krusader easily to access the webdav space.
 
There is another article which describes how to use webdav with totalcommander.
 
 

wdfs

 

That's the fastest way to use webdav. It's important to enter the right credentials because you unfortunately don't get any error message if the password is invalid. Following command mounts the  t-com mediacenter webdav space. /home/framp/webdav is the local directory where the space is mounted and xxxxx  the t-com userid and yyyyyy is the password.

 

wdfs https://webdav.mediencenter.t-online.de /home/framp/webdav/ -o username=This email address is being protected from spambots. You need JavaScript enabled to view it. -o password=yyyyyy  -o accept_sslcert

 

 
davfs 
 
Unfortunately wdfs is not the common way to mount space in Linux. There exist the davfs2 package for this. For OpenSuSE use this this link for download and installation. For Mint use the softwaremanager because davfs is included in the distribution. Afterwards you have to create the mount directory for webdav
 
mkdir /media/webdav
 
and add following line in  /etc/fstab
 
https://webdav.mediencenter.t-online.de        /media/webdav   davfs   rw,noauto,user  0       0 
 
Because the davfs mount command is located in /usr/sbin/mount.davfs and 'mount' expects the command in /sbin you have to create a link 
 
ln -s /usr/sbin/mount.davfs /sbin/mount.davfs
Update 22.3.2012: tomm.fa pointed out in his comment to this page: If dafvs is used (ln -s /usr/sbin/mount.davfs /sbin/mount.davfs) is not needed any more on openSUSE 12..
 
A bug in the webdav implementation of t-online doesn't allow to create files - just to read them. You get a message the file exists - even if it doesn't exist. Therefor you have to  enter in /etc/davfs2b the following line to disable the file locks
 
use_locks       0
 
If you want to mount the webdav space during boot of the system you have to remove the noauto flag in /etc/fstab. In general you will mount the space only if you need it as a normal user - not root. Therefore you have to conffigure 
 
1) To enable mount for a normal user set the suid bit
 
chmod u+s /usr/sbin/mount.davfs
 
2) The user bbbbb who should mount the webdav disk has to be in the group davfs2 
 
usermod -aG davfs2 bbbbb
 
3) Every time you mount the webdav space you will be prompted for the crendentials.
 
framp@obelix:~/.davfs2> mount /media/webdav/
Please enter the username to authenticate with server
https://webdav.mediencenter.t-online.de/ or hit enter for none.
  Username: This email address is being protected from spambots. You need JavaScript enabled to view it.
Please enter the password to authenticate user This email address is being protected from spambots. You need JavaScript enabled to view it. with server
https://webdav.mediencenter.t-online.de/ or hit enter for none.
  Password: 
 
You can place these credentials in a davfs profile. For example enter on user base in ~/.davfs2/secrets the following line
 
https://webdav.mediencenter.t-online.de/    This email address is being protected from spambots. You need JavaScript enabled to view it.    yyyyy 
 
 
where xxxxx is the t-com userid and yyyyyy is the password. You also can configure these credentials globaly for the system so that every user can mount the space without any credential prompt. See man Page for davfs  for details
 
 
gvfs
 
gvfs allows to use dav and davs as protocol. To mount a dav directory use
gio mount davs://seafile <<< "This email address is being protected from spambots. You need JavaScript enabled to view it."$'\n'"PASSWORD"$'\n'
Now you can access your webspace in directory /run/user/$UID/gvfs. Umount the directory with
 
gio mount -u davs://seafile 
 
 
cadaver
 
cadaver allows similar to ftpclient or smbclient to access the webdav space.  There is no way to access the space with a filemanager with cadaver. Two config steps are required:
 
1) ~/.netrc where xxxxx is the t-com user and yyyyyis the password
 
machine webdav.mediencenter.t-online.de
login This email address is being protected from spambots. You need JavaScript enabled to view it.                                                                                     
password yyyyy
 
 2) .cadaverrc
 
open https://webdav.mediencenter.t-online.de
 
See following example how to up- and download files with cadaver
 
framp@obelix:/framp> cadaver
dav:/> put netload
Uploading netload to `/netload':
Progress: [=============================>] 100.0% of 1197 bytes succeeded.
dav:/> get netload
Enter local filename for `/netload': netload
Downloading `/netload' to netload:
Progress: [=============================>] 100.0% of 1197 bytes succeeded.
dav:/> ls
Listing collection `/': succeeded.
        netload                             1197  Oct  8 18:22
dav:/>
dav:/> quit
 
Filemanager
 
There exist various filemanager like Dolphin or Krusader which have their own way to access webdav space. I suggest not to use this feature but use davfs instead to access the space via a mount point.
 
 
krusader Just enter webdavfs://webdav.mediencenter.t-online.de, then userid and password
 
Links
 
dafvs - Bräuchte Hilfe - Gentoo Forum- German
telecom cloud - linux-club Forum- German
 
cadaver - English
 
Error messages
 
In case of errors it's helpful to turn on the debug mode in  /etc/davfs2/davfs2.conf and to check for error messages ins /var/log/messages.
 
mount -t davfs https://webdav.mediencenter.t-online.de/ -o username=This email address is being protected from spambots. You need JavaScript enabled to view it.=yyyyy
mount: unknown filesystem type 'davfs' 
=> Create link 
 
/sbin/mount.davfs: program is not setuid root: No such file or directory
=> Set setuid bit 
 
cp: cannot create regular file `photo.jpg': File exists
==> File /etc/davfs2/davfs2.conf  was not changed so that locks are disabled
 
 
Add comment

*** Note ***

Comments are welcome. But in order to reject spam posts please consider following rules:
  1. Comments with string http are rejected with message You have no rights to use this tag
  2. All comments are reviewed by hand and thus it usually takes one day until a comment will be published.