Menu

Nextcloud KeePass Sync Error

2022-09-27
2022-09-29
  • Wilfried Kern

    Wilfried Kern - 2022-09-27

    I have KeePass installed on my Windows PC and Keepass2Android on my smart phone. I copied the .kdbx file manually to a Raspberry Pi with Nextcloud and from there I synchronize the smart phone.
    Now trying to synchronize the Raspi directly with the KeePass sync function "Synchronize with URL..." I get the error message:
    Failed to import the specified file! The file signature is invalid. Either the file isn't a KeePass database file at all or it is corrupted."
    However, if I download the file from Nextcloud to my desktop using the same link and trying to sync with that downloaded file, every thing is ok.
    Does anyone have an idea where the error could be?

     
  • Paul

    Paul - 2022-09-27

    KeePass uses file transactions which may conflict with Nextcloud.
    Try turning transactions off, Tools > Options > Advanced, File Input/Output Connections.

    cheers, Paul

     
  • Wilfried Kern

    Wilfried Kern - 2022-09-27

    Thanks Paul,

    I deactivated "Use file transactions for writing databases" and also "Use file transactions for writing configuration settings", but without success.

     
  • Paul

    Paul - 2022-09-27

    What sort of sharing are you using? FTP?
    Do you have the correct permissions for deleting and writing?

    cheers, Paul

     
  • Wilfried Kern

    Wilfried Kern - 2022-09-27

    Hi Paul,
    Concerning sharing I'm not sure. What I did:
    I logged into my Raspi Nextcloud where the data.kdbx file which I copied from the original resides. Right clicking on that file-icon and selecting "share file" and then "Share link" I can copy a link to the data.kdbx file. This link address is what I enter in the KeePass sync function window. And as I mentioned earlier, if I use this link in Firefox to download the file, there is no problem.

    Best regards, Wilfried

     
  • Paul

    Paul - 2022-09-27

    Firefox doesn't open the file, save the file, open the file to verify in a very short space of time, so it's not a real test.

    Can you save the database to the URL, as another name?

    cheers, Paul

     
  • Wilfried Kern

    Wilfried Kern - 2022-09-28

    Paul,
    I don't understand what you'r really meaning.
    Rgds, Wilfried

     
  • Paul

    Paul - 2022-09-28

    Can you save to the URL from KeePass? (File > Save As > Save to URL)

    cheers, Paul

     
  • Wilfried Kern

    Wilfried Kern - 2022-09-28

    No success.
    The error returned:
    Failed to save to the specified file!
    The remote server returned an error:(405). Invalid method.
    The target file might be corrupted. Please try saving again. If that fails, save the database to different location.

    I'm going to log into Nextcloud via Putty to find the correct link by myself, not what Nextcloud is telling me. However, I have to do this later today.

     
  • Wilfried Kern

    Wilfried Kern - 2022-09-28

    Hi Paul,

    the mistake was, that I used the URL Nextcloud was showing me selecting the "Share file" hints. On the left bottom of the same page there is an icon "Settings" with the hint "Use this address to access your Files via WebDAV. This in fact is the correct URL and syncronization with that URL works fine.

    I want to thank you for your hints, which pointed me in the right direction.

    One problem still remains: It seems, that automatic syncronization is only possible via scripting with the Sync comand. Or is there any other way of automatic syncing after a change in the main file has been made?

    Best regards, Wilfried

     
  • Paul

    Paul - 2022-09-29

    Auto-sync can be set up via a trigger. Use the event "Saved database file".

    cheers, Paul

     
  • Wilfried Kern

    Wilfried Kern - 2022-09-29

    Hi Paul,

    Now everything is o.k. and I think this thread can be closed. Many thanks again.

    Best regards, Wilfried

     

Log in to post a comment.