Cannot save DB to webdav location
A lightweight and easy-to-use password manager
Brought to you by:
dreichl
If I try to save the keepass DB to a webdav location, it gives me an error (see attachment).
On webdav folder inspection I find two kdbx files: file.kdbx of size 0 and file.kdbx.tmp, which has a proper size.
If I remove the kdbx file with size 0 manually and hit save again in keepass, the DB is saved properly to file.kdbx
This is KeePass attempting to keep your data safe by not deleting the old file until the new one has been written. For some reason your webdav server doesn't correctly delete the old file so you have to do it manually.
As long as you are sure you have valid backups you can turn off file transactions.
Tools > Options > Advanced
Scroll down to File Input / Output Connections.
Turn off "Use file transactions for writing databases".
cheers, Paul
Thanks Paul!
So Apache webdav is the trouble maker. Any change you know what's happening? Here is the Apache log output during the keepass save.
Last edit: hansaplast 2023-04-12
The server seems to delete the KDBX and then recreate it (PUT) but something has failed somewhere. Without tracing the packets it may be impossible to determine.
cheers, Paul
First keepass.kdbx gets deleted, then HEAD is requested on the deleted file. Apache returns 404 (Not Found) which is obvious... Hmm. something is not right here.
The error message mentions "Operation not supported". Most likely one of the operations involved in the file transaction (deletion, rename, ...) failed (KeePass cannot predict this).
In such a case, disable file transactions, like Paul mentioned (and of course make backups regularly).
Best regards,
Dominik