WebDAV on Linux¶
Credits of this description go to Robert Östling: https://gist.github.com/robertostling/fe085016c86fa3688292010799057a1d
This describes how to mount a NextCloud drive locally on a Linux system. Tested with Debian 10 and SUNET drive through Stockholm University.
Install the necessary package, and optionally make your local user able to mount without root access:
sudo apt update sudo apt install davfs2 sudo usermod -a -G davfs2 localuser mkdir /home/localuser/mountpoint
Login to Sunet Drive and obtain the webdav URL from Settings (the one in the lower left corner), and create an application password from user symbol (the one in the upper right corner) -> Security -> Devices & sessions. The WebDAV URL looks similar to this: https://su.drive.sunet.se/remote.php/dav/files/tene3253%40su.se/
Edit /etc/davfs2/secrets to contain the following line, using the information obtained above:
Edit /etc/davfs2/davfs2.conf and ensure that the following options are set:
Edit /etc/fstab and append:
Re-login (as localuser), and mount the share: