Webdav and multiviews

Fortunately the excellent KeePass password manager has the ability to store its database on a webdrive. However, since version 2.09 KeePass changed the way it saves files to such a webdrive.  Instead of just saving over the old file it first creates a .tmp file that it moves to the real file after a successful save. And that’s when the problem arises.

It turns out that renaming a file from mypasswd.kdbx.tmp to mypasswd.kdbx doesn’t play nice with the apache multiviews option. When trying to save a file to the webdav  location, KeePass fails with a message like:
https://kerkhove.net/some_dav_location/mypasswd.kdbx
Failed to save the current database  to the specified location!
The remote server returned an error: (404) Not Found.

When looking at the apache error log it logs a line like:
Negotiation: discovered file(s) matching request: /var/www/path/to/some_dav_location/mypasswd.kdbx (None could be negotiated)
The solution to this problem is to disable MultiViews in the apache config. Find the part in your config that has the “Dav on” statement and add a line like:
Options -MultiViews
For security reasons you may want to add “-Indexes” there as well (and of course password protect your dav space using digest authentication).

Posted on November 29, 2009 at 20:37 by alex · Permalink
In: linux · Tagged with: , ,

2 Responses

Subscribe to comments via RSS

  1. Written by cripanol
    on 2009/12/16 at 14:55
    Permalink

    Hey, thanks for that. Same problem when upgrading to 2.09 and it was driving me mad. Disabling multiviews on apache gets it all going again.

  2. Written by molys
    on 2012/03/01 at 19:37
    Permalink

    Thx, you helped me 😀

Subscribe to comments via RSS

Leave a Reply