Install davfs2
apt-get install davfsReconfigure davfs2 to allow access to other users (select ‘yes’ when prompted).
dpkg-reconfigure davfs2 Add users you want to be able to mount the share (where USER is the username)
usermod -aG davfs2 USER
Create a mountpoint
mkdir /mnt/owncloudMount the WebDav ownCloud
mount -t davfs https://owncloud_address_or_ip/owncloud/remote.php/webdav /mnt/owncloudIf your owncloud installation is in a directory other than ‘owncloud’ substitute it above. I used HTTPS which will encrypt communication and credentials but HTTP can also be used but obviously is higher risk.
Credentials can be automatically supplied by adding them to the following files
system wide /etc/davfs/secrets
individually ~/.davfs2/secrets
Edit either file using nano and add
https://owncloud_address_or_ip/owncloud/remote.php/webdav /mnt/owncloud USERNAME PASSWORDTo mount on boot add the following to fstab
https://owncloud_address_or_ip/owncloud/remote.php/webdav /mnt/owncloud davfs2 user,auto 0 0(using noauto instead of auto will prevent it beingmounted automatically so choose depending on your enviroment)
To manually mount use
mount /mnt/owncloudTo unmount use
umount /mnt/owncloudWhen I tried to create a test file on the shared I got the following error
touch: setting times of ‘test’: No such file or directoryTo fix this edit your /etc/davfs2/davfs2.conf file and change/uncomment the ‘use_locks’ parameter to
use_locks 0