mholt / caddy-webdav

WebDAV handler module for Caddy
Apache License 2.0
222 stars 23 forks source link

Not compatible with MacOS Finder #41

Closed sidamos closed 4 months ago

sidamos commented 4 months ago

I have Caddy with this module configured and it is working fine for iPhone KeePassium.

For MacOS, I am using KeePassXC, which does not support webdav directly, so I have to mount the directory with MacOS Finder.

It lists the files, but I cannot create or rename files, so KeepassXC cannot save the database. I also tried create and rename directly in the Finder and it does not work.

After some investigation, it looks like MacOS requires the webdav server to support "Level 2 locking". Apache can do that and Nginx with some workarounds, but looks like this module does not.

I tried various configs, including the standard:

        webdav /dav/* {
                root /dav/
                prefix /dav
        }
mholt commented 4 months ago

I don't actually know a lot about WebDAV. I just put the x/net/webdav package into a Caddy handler :sweat_smile: I guess it doesn't support level-2 locking, but I'm not sure.

Anyone is welcome to tackle this!

Edit: I did just update the dependencies (they were quite old) so you could always update and try again in case they happened to recently add support.

sidamos commented 4 months ago

Thank you for updating the dependencies! I rebuilt the caddy image and now I can create, rename and delete files in the webdav share on the Mac without problems.

However, this did not fix the problem with KeePassXC. But I found an "alternative storage method" in its preferences and with that, it does work. I don't know if that option also would have fixed it with the old webdav module version though.

So, there is still a difference between Caddy webdav and Apache webdav (because that did not require the "alternative storage method" of KeePassXC). I don't know if you want to keep this issue open because of that.

mholt commented 4 months ago

Huh, that's rather amazing. Glad it works.

I have no idea about KeePassXC -- I see that checkbox in their user manual but I'm not sure what it does. I haven't found an explanation.