Mounting a Webdav File System: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Quite often we will give a researcher access to some resource by giving a webdav enabled url, a username and password. This page describes how to use this url. In the remainder of this page we will assume that you were given the url https://exp.socsci.ru.nl/experiment/webdav.php, the username u123456 and the password PASSWORD.
Quite often we will give a researcher access to some resource by giving a webdav enabled url, a username and password. This page describes how to use this url.  
 
In the remainder of this page we will assume that you were given the url <code><nowiki>https://exp.socsci.ru.nl/experiment/webdav.php</nowiki></code>, the username <code>u123456</code> and the password <code>PASSWORD</code>.


The resource can be anything. It can be simply a folder for shared data, or it can be a web experiment accessible via another (non webdav) url.
The resource can be anything. It can be simply a folder for shared data, or it can be a web experiment accessible via another (non webdav) url.
Line 12: Line 14:
In Linux (and other POSIX compliant operating systems) you can connect a local directory (~/experiment in this example) to the Webdav resource (replace USER with your username):
In Linux (and other POSIX compliant operating systems) you can connect a local directory (~/experiment in this example) to the Webdav resource (replace USER with your username):


  sudo apt install davfs2 # no need to allow non root users (setuid root)
<pre>
  mkdir ~/experiment
sudo apt install davfs2 # no need to allow non root users (setuid root)
  sudo mount.davfs https://exp.socsci.ru.nl/experiment/webdav.php ~/experiment -o rw,uid=USER,gid=USER
mkdir ~/experiment
sudo mount.davfs https://exp.socsci.ru.nl/experiment/webdav.php ~/experiment -o rw,uid=USER,gid=USER
</pre>


If you want to mount this resource each time you boot your computer, put the following in /etc/fstab (replacing USER with your username)
If you want to mount this resource each time you boot your computer, put the following in /etc/fstab (replacing USER with your username)


  https://exp.socsci.ru.nl/experiment/webdav.php /home/USER/experiment davfs _netdev,noauto,user,uid=USER,gid=USER 0 0
<pre>
https://exp.socsci.ru.nl/experiment/webdav.php /home/USER/experiment davfs _netdev,noauto,user,uid=USER,gid=USER 0 0
</pre>


and put the password in /etc/davfs2/secrets using:
and put the password in /etc/davfs2/secrets using:


  /home/USER/experiment u123456 PASSWORD
<pre>
/home/USER/experiment u123456 PASSWORD
</pre>


== Nautilus ==
== Nautilus ==