Menu

#2242 Cannot save DB to webdav location

KeePass_2.x
closed
nobody
5
2024-04-25
2023-04-12
hansaplast
No

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

1 Attachments

Discussion

  • Paul

    Paul - 2023-04-12

    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

     
    • hansaplast

      hansaplast - 2023-04-12

      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
  • Paul

    Paul - 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

     
  • hansaplast

    hansaplast - 2023-04-12
    "GET /mobile/credentials/keepass.kdbx HTTP/1.1" 200 14571 "-" "gvfs/1.44.1"
    "PUT /mobile/credentials/keepass.kdbx.tmp HTTP/1.1" 204 312 "-" "gvfs/1.44.1"
    "DELETE /mobile/credentials/keepass.kdbx HTTP/1.1" 204 312 "-" "gvfs/1.44.1"
    "GET /mobile/credentials/keepass.kdbx.tmp HTTP/1.1" 200 14493 "-" "gvfs/1.44.1"
    "HEAD /mobile/credentials/keepass.kdbx HTTP/1.1" 404 217 "-" "gvfs/1.44.1"
    "PUT /mobile/credentials/keepass.kdbx HTTP/1.1" 201 730 "-" "gvfs/1.44.1"
    

    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.

     
  • Dominik Reichl

    Dominik Reichl - 2024-04-25
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2024-04-25

    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

     

Log in to post a comment.

MongoDB Logo MongoDB