Difference between revisions of "LSDF Online Storage: WebDAV"

From Lsdf
(Add migration note)
(Tag: Replaced)
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
This page has been updated and migrated to the new docs site:
WebDAV or Web-based Distributed Authoring and Versioning is an extension of the Hypertext Transfer Protocol (HTTP) allowing to access files over the internet. WebDAV access to the LSDF Online Storage is provided via a cluster of servers reachable at the address '''https://os-webdav.lsdf.kit.edu'''.
 
   
  +
https://www.lsdf.kit.edu/docs/webdav-https/
__FORCETOC__
 
 
 
 
== Using WebDAV from a Web Browser ==
 
 
To access the starting page enter the following URL in your web browser
 
<pre>
 
https://os-webdav.lsdf.kit.edu/
 
</pre>
 
Project directories are accessible at the usual location:
 
<pre>
 
https://os-webdav.lsdf.kit.edu//kit/<OE>/projects/<PROJECTNAME>
 
</pre>
 
where ''<OE>'' is the name of your organizational unit, e.g. scc, and
 
''<PROJECTNAME>'' ist the name of the project.
 
Your home directory is accessible at the following URL:
 
<pre>
 
https://os-webdav.lsdf.kit.edu//kit/inst/<OE>/<USERNAME>/
 
</pre>
 
where ''<USERNAME>'' is you KIT username.
 
 
 
 
== Using WebDAV on Linux ==
 
 
 
=== Using DaviX in the Command Line ===
 
 
The DaviX project provides a library and a set of client tools for file management over
 
HTTP-based protocols. The command line client tools can be either installed as a regular
 
package in you linux distribution, e.g. in RedHat based distributions with
 
<pre>
 
$ yum install -y epel-release
 
$ yum install davix
 
</pre>
 
or from the [https://dmc.web.cern.ch/projects/davix/home home page of the DaviX project].
 
 
 
 
==== Listing a Directory ====
 
 
The content of a directory or individual files can be listed with the following command:
 
<pre>
 
$ davix-ls -l davs://os-webdav.lsdf.kit.edu/kit/scc/xy1234
 
Basic authentication - server is asking for username and password:
 
Login: xy1234
 
Password:
 
-rwxrwxrwx 0 10485760 2019-05-20 09:29:18 a_small_file
 
</pre>
 
 
==== Copying a File ====
 
 
To copy a file from the WebDAV share to you local directory:
 
<pre>
 
$ davix-get davs://os-webdav.lsdf.kit.edu/kit/scc/xy1234/testfile testfile
 
Basic authentication - server is asking for username and password:
 
Login: xy1234
 
Password:
 
Performing Read operation on: davs://os-webdav.lsdf.kit.edu/kit/scc/xy1234/testfile
 
[==================================] 100% 10MiB/10MiB 0B/s
 
</pre>
 
 
==== Recursively Uploading Files ====
 
 
Uploading files recursively with 6 transfers in parallel:
 
<pre>
 
$ davix-put -r6 a_directory davs://os-webdav.lsdf.kit.edu/kit/scc/xy1234/a_new_directory
 
Basic authentication - server is asking for username and password:
 
Login: xy1234
 
Password:
 
Populating task queue for a_directory/ Files processed: 0
 
</pre>
 
 
==== Recursively downloading files ====
 
 
Files and directories can be downloaded recursively
 
<pre>
 
$ davix-get -r6 davs://os-webdav.lsdf.kit.edu/kit/scc/xy1234/a_new_directory downloaded_dir
 
Basic authentication - server is asking for username and password:
 
Login: xy1234
 
Password:
 
Crawling davs://os-webdav.lsdf.kit.edu/kit/scc/xy1234/a_new_directory/ Files processed: 1
 
</pre>
 
 
 
 
=== Mounting a WebDAV Share ===
 
 
davfs2 is a file system driver that allows mounting a WebDAV server as a local file system, like a disk drive. This way, applications can access resources on a WebDAV server without knowing anything about HTTP or WebDAV. davfs2 does extensive caching to make the file system responsive, to avoid unnecessary network traffic and to prevent data loss, and to cope for slow or unreliable connections.
 
 
 
==== Installation ====
 
 
On CentOS or RedHat like systems install the package davfs2 which is available in the epel repository:
 
$ yum install -y epel-release
 
$ yum install davfs2
 
 
 
==== Mounting a Share (as root) ====
 
 
To mount an LSDF WebDAV share issue the following command as root:
 
 
$ mkdir /mnt/webdav
 
mount.davfs https://os-webdav.lsdf.kit.edu/ /mnt/webdav >/dev/null 2>&1
 
Please enter the username to authenticate with server
 
https://os-webdav.lsdf.kit.edu/ or hit enter for none.
 
Username: xy1234
 
Please enter the password to authenticate user fg9068 with server
 
https://os-webdav.lsdf.kit.edu/ or hit enter for none.
 
Password:
 
 
or
 
 
$ mount.davfs -o username=xy1234,uid=xxx,gid=yyy,rw https://os-webdav.lsdf.kit.edu/inst/projects /mnt/webdav
 
 
 
'''WebDAV mount check:'''
 
<pre>
 
>df | grep webdav
 
https://os-webdav.lsdf.kit.edu/ 26666664 13333332 13333332 50% /mnt/webdav
 
</pre>
 
 
'''Mount WebDAV share using fstab'''
 
<pre>
 
>cat /etc/fstab | grep webdav
 
https://os-webdav.lsdf.kit.edu/kit/inst/projects /mnt/webdav davfs rw,noauto,user,uid=xy1234 0 0
 
 
>mkdir /mnt/webdav
 
 
>cat /etc/davfs2/secrets | grep os-webdav
 
https://os-webdav.lsdf.kit.edu/kit/inst/projects xy1234 ***
 
 
>mount /mnt/webdav >/dev/null 2>&1
 
</pre>
 
 
'''WebDAV umount:'''
 
<pre>
 
>umount.davfs /mnt/webdav
 
</pre>
 
 
<H3>Mount WebDAV share as user</H3>
 
 
'''davfs2''' makes mounting by unprivileged users as easy and secure as possible.
 
 
User must be a member of the davfs2 group:
 
<pre>
 
>usermod -a -G davfs2 xy1234
 
>grep davfs2 /etc/group
 
</pre>
 
 
'''Example:'''
 
<pre>
 
>cat /etc/fstab | grep webdav
 
https://os-webdav.lsdf.kit.edu/kit/inst/projects /mnt/webdav davfs rw,noauto,user,uid=xy1234 0 0
 
 
>chmod 600 /lsdf/kit/inst/xy1234/.davfs2/secrets
 
 
>cat /lsdf/kit/inst/xy1234/.davfs2/secrets | grep os-webdav
 
https://os-webdav.lsdf.kit.edu/kit/inst/projects xy1234 ***
 
 
>mount /mnt/webdav >/dev/null 2>&1
 
 
>umount /mnt/webdav
 
umount: /mnt/webdav: umount failed: Operation not permitted
 
</pre>
 
 
You can mount the above-mentioned WebDAV share using '''sudo''' utility.
 
 
=== WebDAV client cadaver ===
 
 
'''cadaver''' is a command-line WebDAV client, with support for file upload, download, on-screen display, in-place editing, namespace operations (move/copy), collection creation and deletion, property manipulation, and resource locking.
 
 
'''Installation:'''
 
<pre>
 
yum install cadaver
 
</pre>
 
 
'''Example:'''
 
<pre>
 
cadaver https://os-webdav.lsdf.kit.edu/kit/inst/xy1234
 
dav:/kit/inst/xy1234/> help
 
Available commands:
 
Available commands:
 
ls cd pwd put get mget mput
 
edit less mkcol cat delete rmcol copy
 
move lock unlock discover steal showlocks version
 
checkin checkout uncheckout history label propnames chexec
 
propget propdel propset search set open close
 
echo quit unset lcd lls lpwd logout
 
help describe about
 
Aliases: rm=delete, mkdir=mkcol, mv=move, cp=copy, more=less, quit=exit=bye
 
</pre>
 
 
=== Connection via File Manager ===
 
 
* '''Nautilus''' (Gnome)
 
* '''Kubuntu (Dolphin/Konqueror)''' (KDE)
 
* '''Xubuntu (Thunar)''' (Xfce)
 
* '''Lubuntu (PCManFM)'''
 
*
 
 
 
 
 
== Using WebDAV on Windows ==
 
 
=== Add network address ===
 
 
'''Example:'''
 
Computer => Add network address => Continue => https://os-webdab.lsdf.kit.edu/kit/inst/projects
 
 
=== Network drive over WebDAV ===
 
 
'''Examples:'''
 
<pre>
 
>net use * https://os-webdav.lsdf.kit.edu/kit/inst/projects /user:xy1234
 
Laufwerk W: ist jetzt mit https://os-webdav.lsdf.kit.edu/ verbunden.
 
Der Befehl wurde erfolgreich ausgeführt.
 
 
or
 
 
>net use * \\os-webdav.lsdf.kit.edu@SSL\ /user:xy1234
 
...
 
</pre>
 
 
 
[[Category:LSDF_Online_Storage]]
 

Latest revision as of 10:34, 27 January 2023

This page has been updated and migrated to the new docs site:

https://www.lsdf.kit.edu/docs/webdav-https/