Problem with davfs2 for command-line webdav mount: not recognizing stored passwords

I’ve followed the nextcloud tutorial here to create a webdav mount on a raspbian wheezy machine. However, I’m getting prompted for the username and password even once I’ve added them into the secrets file. If I enter the username and password at the prompt, the connection works, so I have the correct username/password. If I use the /etc/davfs2/davfs2.conf file to set ask_auth 0, I instead get could not authenticate to server: rejected Basic challenge.

Does anyone have suggestions for troubleshooting this?

I think it isn’t necessary to modify the /etc/davfs2/davfs2.conf file at all in a first attempt.
davfs2 by defaults uses user specific files which should be stored in [user-home-directory/.davfs2. In this directory you store a custom davfs2.conf file which could look like this:

trust_ca_cert [user-home-directory]/.davfs2/nextcloud-certificate.pem
secrets       [user-home-directory]/.davfs2/custom-secrets

Additionally you store a custom secrets file in that directory, which looks like this:

[absolute-path-to-mount-directory]  [nextcloud-user]  [nextcloud-app-specific-password]

That’s how it works for me. :smiley: