Terry : Mount WebDAV on Linux

What is WebDAV

Web Distributed Authoring and Versioning (WebDAV) is an extension of the Hypertext Transfer Protocol (HTTP) that facilitates collaboration between users in editing and managing documents and files stored on World Wide Web servers. A working group of the Internet Engineering Task Force (IETF) defines WebDAV in RFC 4918.

The WebDAV protocol makes the Web a readable and writable medium. It provides a framework for users to create, change and move documents on a server; typically a web server or web share. The most important features of the WebDAV protocol include the maintenance of properties about an author or modification date, namespace management, collections, and overwrite protection. Maintenance of properties includes such things as the creation, removal, and querying of file information. Namespace management deals with the ability to copy and move web pages within a server’s namespace. Collections deals with the creation, removal, and listing of various resources. Lastly, overwrite protection handles aspects related to locking of files.

davfs2

Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-protocol, allows authoring of resources on a remote web server. davfs2 provides the ability to access such resources like a typical filesystem, allowing for use by standard applications with no built-in support for WebDAV.

  • davfs2 is designed to fully integrate into the filesystem semantics of Unix-like systems (mount, umount, etc.). davfs2 makes mounting by unprivileged users as easy and secure as possible. 
  • 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. 
  • davfs2 will work with most WebDAV servers needing little or no configuration. 
  • davfs2 is developed and tested on GNU/Linux but porting to other free operating systems should not be too cumbersome.

Mount WebDAV as file system

Install davfs2 package

sudo apt-get install davfs2

mount WebDAV folder

# Create a mount point
$ mkdir -p /mnt/webdav
 
# Mount
$ sudo mount -t davfs "https://stbeehive.oracle.com/content/dav/st/Mw CoE/Public Documents/Training Hub/" /mnt/webdav
Please enter the username to authenticate with server
https://stbeehive.oracle.com/content/dav/st/Mw CoE/Public Documents/Training Hub/ or hit enter for none.
  Username: username
Please enter the password to authenticate user username with server
https://stbeehive.oracle.com/content/dav/st/Mw CoE/Public Documents/Training Hub/ or hit enter for none.
  Password:  

NOTE: use rsync to copy contents.

rsync -av --progress --stats /mnt/webdav ~/target

Reference

http://savannah.nongnu.org/projects/davfs2