Difference between revisions of "Webdav"

From Klaus' wiki
Jump to: navigation, search
(Created page with 'WebDAV is a convenient way of handling file access through a webserver. In order to access webdav drives you need to have the appropriate file system software installed. As roo…')
 
Line 1: Line 1:
 
WebDAV is a convenient way of handling file access through a webserver.
 
WebDAV is a convenient way of handling file access through a webserver.
  
In order to access webdav drives you need to have the appropriate file system software installed.
+
In order to access WebDAV drives you need to have the appropriate file system software installed.
  
 
As root:
 
As root:
  
 
<source lang="bash">
 
<source lang="bash">
$ yum install davfs wdfs
+
$ yum install davfs
 +
</source>
 +
 
 +
==Mount you ownCloud==
 +
If you have a owncloud service available you can mount it using automount. Automount or autofs will automagically mount the exported webdav drive when you access the mount point.
 +
 
 +
Create a mount point as the login user you normally uses.
 +
<source lang="bash">
 +
$mkdir -p /home/YourLogin/mounts/owncloud
 +
</source>
 +
 
 +
As '''root''' add to the /etc/davfs2/secrets this line:
 +
 
 +
<source lang="bash">
 +
http://owncloud.YourServer.Domain/files/webdav.php YourUserName YourPassword
 +
</source>
 +
changing ''YourServer.Domain'', ''YourUserName'' and '' YourPassword'' with the ones that reflects your setup.
 +
 
 +
Then in /etc/auto.master add a line like this:
 +
 
 +
<source lang="bash">
 +
/home/YourLogin/mounts/owncloud /etc/auto.owncloud.davfs uid=1000,gid=1000,--timeout=600,--ghost
 +
</source>
 +
again modify ''YourLogin'' with your login name.
 +
 
 +
Create the file /etc/auto.owncloud.davfs and add this:
 +
 
 +
<source lang="bash">
 +
m -fstype=davfs,rw,dir_mode=0777,file_mode=0666 :http\://owncloud.YourServer.Domain/files/webdav.php
 +
</source>
 +
again  ''YourServer.Domain'' shall be fixed to reflect your setup.
 +
 
 +
Try it:
 +
 
 +
<source lang="bash">
 +
$ service autofs stop  #Stop any running autofs service
 +
$ automount -f -v
 +
</source>
 +
 
 +
First observe that no errors are issued. The in another console try to access the mount point. If no error are shown in the roor console everything is fine, otherwise debug until it works.
 +
 
 +
Stop the automount by pressing Ctrl+C.
 +
 
 +
No restart the autofs
 +
 
 +
<source lang="bash">
 +
$service autofs start
 
</source>
 
</source>
  
 
==Mount Box.net==
 
==Mount Box.net==

Revision as of 20:55, 23 April 2013

WebDAV is a convenient way of handling file access through a webserver.

In order to access WebDAV drives you need to have the appropriate file system software installed.

As root:

$ yum install davfs

Mount you ownCloud

If you have a owncloud service available you can mount it using automount. Automount or autofs will automagically mount the exported webdav drive when you access the mount point.

Create a mount point as the login user you normally uses.

$mkdir -p /home/YourLogin/mounts/owncloud

As root add to the /etc/davfs2/secrets this line:

http://owncloud.YourServer.Domain/files/webdav.php YourUserName YourPassword

changing YourServer.Domain, YourUserName and YourPassword with the ones that reflects your setup.

Then in /etc/auto.master add a line like this:

/home/YourLogin/mounts/owncloud /etc/auto.owncloud.davfs uid=1000,gid=1000,--timeout=600,--ghost

again modify YourLogin with your login name.

Create the file /etc/auto.owncloud.davfs and add this:

m -fstype=davfs,rw,dir_mode=0777,file_mode=0666 :http\://owncloud.YourServer.Domain/files/webdav.php

again YourServer.Domain shall be fixed to reflect your setup.

Try it:

$ service autofs stop   #Stop any running autofs service
$ automount -f -v

First observe that no errors are issued. The in another console try to access the mount point. If no error are shown in the roor console everything is fine, otherwise debug until it works.

Stop the automount by pressing Ctrl+C.

No restart the autofs

$service autofs start

Mount Box.net