Creating WebDAV mounts on the Linux command line

Hi everyone

I am new to this forum and I am not sure whether this is the right category, so you might have to point me to the right one.

Until now I have used the Nextcloud client with Mate on Linux Mint, but now I have changed OS to antiX, and as I understand it, I now have to use webdav. I do not have any experience with that, so I did not succeed in my first attempt trying to follow the instructions Creating WebDAV mounts on the Linux command line. I had to reinstall antiX, it stopped launching during startup after I had entered my user credentials to my Nextcloud server.

So to be sure, I need to know exactly how to understand step 6: Add your Nextcloud login credentials to the end of the secrets file, using your Nextcloud server URL and your Nextcloud username and password:

https://example.com/nextcloud/remote.php/dav/files/USERNAME/ <username> <password>
or
$PathToMountPoint $USERNAME $PASSWORD
for example
/home/user/nextcloud john 1234

I do not understand, why this β€œor”?
I guess though that I have to enter my Nextcloud URL and user credentials. However, my Nextcloud says I must use this URL:https://MYSERVER.TLD/remote.php/webdav/ and not https://MYSERVER.TLD/remote.php/dav/files/USERNAME. So which address should I use? And do I have to enter my username twice (USERNAME/ <username> )?

I think there are two different url to use, depending on how the client detects available shares and users.

What always worked for me is https://domain.com/remote.php/dav/files/username/

You still need to use your username on authentication.

1 Like

Thank you for your answer.
I followed your example, but now another error occurred when running
mount ~/nextcloud

/sbin/mount.davfs: warning: the server does not support locks

It looks like I have to change something on the server, but what?

Yes in your davfs config to turn off locks. A very good guide here : https://wiki.archlinux.org/index.php/Davfs2

I had to have a look at something else, and have just discovered that my mount works, so the future will show which consequences the warning will bring.
Thanks for your help, I will probably need your link to the guide later.