Davfs2: Difference between revisions

From Newroco Tech Docs
Jump to navigationJump to search
No edit summary
No edit summary
Line 32: Line 32:
umount ~/nextcloud
umount ~/nextcloud
</pre>
</pre>
 
If that doesn't remove it use instead
<pre>
fusermount -u ~/nextcloud
</pre>
==Troubleshooting==
==Troubleshooting==
If you get something like this when mounting '''/sbin/mount.davfs: warning: the server does not support locks''' then edit /etc/davfs2/davfs2.conf file and set '''use_locks 0'''
If you get something like this when mounting '''/sbin/mount.davfs: warning: the server does not support locks''' then edit /etc/davfs2/davfs2.conf file and set '''use_locks 0'''

Revision as of 07:02, 10 February 2021

Davfs2 allows you to access resources on a remote server like it would be a local disk, in this case nextcloud.

Install and configure davfs2

Install davfs2:

sudo apt-get install davfs2

Add yourself to davfs group:

sudo usermod -aG davfs2 <username>

Create a directory, and mount it:

mkdir ~/nextcloud
sudo mount -t davfs https://files.newro.co/remote.php/dav/files/<username>/ ~/nextcloud

After the mount you will be prompted for your username and password from nextcloud.

If you want to mount a specific folder from nextcloud simply add the path after <username>:

sudo mount -t davfs https://files.newro.co/remote.php/dav/files/<username>/My/Super/folder/Path ~/nextcloud


Please unmount the nextcloud directory when finished, makes it harder to scan for big directories in case a VM has storage issues. Plus, you're leaving your nextcloud files exposed to others.

You can unmount the directory like this:

umount ~/nextcloud

If that doesn't remove it use instead

fusermount -u ~/nextcloud

Troubleshooting

If you get something like this when mounting /sbin/mount.davfs: warning: the server does not support locks then edit /etc/davfs2/davfs2.conf file and set use_locks 0