WebDAV sync issue

I'm currently trying to sync to WebDAV on a container on my home server.

The error I'm getting:
PROPFIND : Unknown error 2 (401): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>401 Unauthorized</title> </head><body> <h1>Unauthorized</h1> <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p> </body></html> (Code 401)

I can upload to the container using cadaver, but for some reason Joplin won't sync. I've re-entered the correct settings, repeatedly, so it's not a typo.

Does anyone have any ideas on what could be causing this? Thanks in advance :slight_smile:

Do you have the proper outgoing ports set so that Joplin can actually connect? I’m not sure which ones they are for your particular setup, but when I set up my NextCloud server the other day, I ran into a similar problem and opening 443 and 80 fixed it for me.

Create an additional webdav directory on your server for joplin with the basic authorization method instead of Digital, and everything will work for you. I spent almost a week solving this issue. Sorry for my English.

Sorry Alexey, what is Digital? Don’t quite understand.

1 Like

@_dan, could you share a screenshot of your current Synchronization settings window? You might want to blur or black out any personal info first

Here’s the settings. I’ve tried with/without setting the LOCATION (i.e. /webdav/, in case I’m using the wrong terms), routing host port 80 to port 80 on the container. Not had any success yet.

Can you try remote.php/webdav instead of just webdav?

Hi! Tell me, is your server built on apache or nginx? If on apache, then show the webdav server configuration.

This didn’t work. Same error.

@Alexey It’s Apache. This image, specifically: https://github.com/BytemarkHosting/docker-webdav

This is what I found in the container logs:
192.168.0.100 - - [09/Mar/2020:16:57:47 +0000] "PROPFIND /pook/ HTTP/1.1" 403 199 "-" "Joplin/1.0"
[Mon Mar 09 16:57:54.321562 2020] [auth_digest:error] [pid 16:tid 1990434172] [client 192.168.0.100:47208] AH01781: client used wrong authentication scheme `Basic': /webdav/

Looking at the docker-compose.yml, it seems that I've set the auth type to Digest, but then provided the basic auth's credentials. For the time being I've set it to Basic and it works fine.

Thanks for your patience, all! :slightly_smiling_face:

I’m glad you solved the problem. I initially told you that you need to do Basic authorization. There may be a misunderstanding due to my poor English. I’m sorry if I misled you a little.

Ah @Alexey, I understand what you meant now. You said Digital authentication, instead of Digest. I would have probably worked it out, but I only found out that digest authentication was a thing when I inspected the file more closely. Thanks for your help!