Menu

keepass2 Portable from network share might produce errors when closing

Tom X
2026-02-02
2026-02-04
  • Tom X

    Tom X - 2026-02-02

    for deployment reasons we've put keepass2 portable on a read-only network share (samba with windows clients).

    This works fine except for rare reports about errors (see screenshots) when closing keepass2.

    My guess is that a client that goes into energy saving mode looses the handles to the keepass2 exe/dlls open on the fileserver and therefore somehow looses it's knowledge about whether/ where / how to save user config.

    I can provoke these error messages by
    - opening portable keepass2 from the share
    - killing the smbd process that handles this particular connection
    - and then closing the keepass2 app

    I'm aware that everything works as designed :) - but maybe there's an easy way to catch this situation and prevent these popups. Or a config option to suppress this.

    this is with v2.60 (but versions before also showed that behaviour)

     
  • Paul

    Paul - 2026-02-02

    You need to prevent KeePass writing the config file to the network (I'm assuming that's what the error says).

    The KeePass.config.xml file on the network should only contain one line: "PreferUserConfiguration true"

    If KeePass can't write to the local file it will attempt to write to the global one (on the network). I don't think you can change this behaviour, you can only disable saving.

    cheers, Paul

     
    • Tom X

      Tom X - 2026-02-02

      I've made these settings.. everything works fine without any error messages under normal circumstances.

      these are the files open normaly

      586218       10501      DENY_WRITE 0x120089    RDONLY     LEASE(RH)        /xxx   yyy/programme/keepass2/KeePass.XmlSerializers.dll   Thu Jan 29 10:19:56 2026
      586218       10501      DENY_WRITE 0x1000a1    RDONLY     LEASE(RH)        /xxx   yyy/programme/keepass2/KeePass.exe   Thu Jan 29 10:19:52 2026
      586218       10501      DENY_WRITE 0x1000a1    RDONLY     LEASE(RH)        /xxx   yyy/programme/keepass2/KeePassLibC64.dll  Thu Jan 29 10:20:05 2026
      

      a disconnected (sleeping) client will loose those and result in the error messages afterwards.

      I know that all of this is somehow normal behaviour.

      I'm just describing an (I think valid) use case of the portable client and a problem.

      Given that the whole folder of the portable client is only ~5MB I wonder if it would be an option to kind of pull the whole portable client into RAM and not depend on dll / exe access afterwards (but I'm not a programmer and not a windows guy)

       
  • Paul

    Paul - 2026-02-02

    I think the best "fix" is to add an option in KeePass to disable fallback writing to the global config, as an adjunct to disabling save.

    cheers, Paul

     
  • Tom X

    Tom X - 2026-02-04

    I have to add / correct myself:
    depending on the operations in the keepass app it crashes not only when closing the app.

    Actually thats more logical for me when pulling the mapped .exe and .dlls away underneath.
    (guess it depends of what of these is already in RAM)

    So unless there's a way to start and run keepass completely in RAM and indenpendent of the underlying storage I don't think that problem is solvable with a config option.

     

Log in to post a comment.