Davfs2: Difference between revisions

From Newroco Tech Docs
Jump to navigationJump to search
No edit summary
Line 19: Line 19:
</pre>
</pre>
After the mount you will be prompted for your username and password from 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>:
<pre>
sudo mount -t davfs https://files.newro.co/remote.php/dav/files/<username>/My/Super/folder/Path ~/nextcloud
</pre>


'''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.'''
'''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.'''

Revision as of 14:41, 25 February 2020

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

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