Menu

Why does <database name>.plk cause Password Safe to show Warning could not lock file

Help
2017-11-10
2017-11-30
  • Brittney Smith

    Brittney Smith - 2017-11-10

    Using Linux Password Safe 1.03 in Mint 18.1 64 bit.
    This is a new problem that started well after installing the downloaded v1.0.3. Don't think it ever happened in v1.01 or 1.02, nor in earlier Windows versions.

    After entering the DB password, PWS shows "Warning could not lock file, opening as read only." [I assume it means the DB file, as the file is RO, once it opens.

    Based on past posts or bug reports, I renamed the .plk file.
    That fixed the problem temporarily.
    Based on the "date modified" of the next <name>.plk file, 9 days later another plk file appears in the same location as the DB & the "opening as read only" issue was back. Renamed it and the DB opens normally, as before.</name>

    If this is a known issue & can't be fixed, could the warning be more detailed, so users know what to do?

    What is the function of the .plk "lock file"?
    I take it they should disappear after PWS closes? Because there's only one, other than the ones I renamed. I'm guessing once in a while, they aren't deleted after closing PWS & causes this issue?

    In Linux, these are ways that I've closed PWS - many times with no issues- until recently.
    * PWS is locked in the notification area when Linux is shut down (Linux closes PWS).
    * I click PWS icon (active or locked) > Exit, in notification area, then close Linux.
    * I'm sure at times, PWS was open when Linux shut down (& no warning PWS is still open), and never saw this issue till recently.

    Thanks.

     
  • Brittney Smith

    Brittney Smith - 2017-11-27

    This is still going on. No one, including Rony have a clue?
    In Linux Mint 18.1, the DB is not in the same location as program files, nor the same location as pwsafe.cfg .
    The DB file ~/Documents/backups/passwordsafe/PassWord Safe_TEMP ver of 2013-07-18_134500.psafe3 is owned by my (only) user acct.
    The permissions for the owner are r / w / x.
    For Group & other, permissions are read only. I don't know if this is a problem? Maybe even though my user acct is the owner, when PWS 1st opens the DB, it does so under Group or Other? Just guessing.

    I didn't have this problem in v1.02 for Linux.

    If I rename or delete the old .plk files, the problem of opening the DB as RO goes away.
    The only contents in the .plk file is "<user name="">@d5200:00006617,
    where d5200 is the computer name.</user>

    ** What is the purpose of the plk files & should they be going away after I properly close PWS?

     
  • Rony Shapiro

    Rony Shapiro - 2017-11-27

    The .plk file is meant to protect the password file (.psafe3) from being opened r/w concurrently by more than one instance of PasswordSafe. It should be removed when there's no instance that has a password file open in r/w mode.
    group and other premissions are irrelevant.

     
  • Brittney Smith

    Brittney Smith - 2017-11-30

    OK, thanks. Is this a known bug in the Linux versions (1.03b) - that .plk files aren't being removed automatically if PWS is closed by shutting down Linux (not exiting PWS 1st)? Then, in Linux, the existance of the old .plk file does make a difference - next time causes the same DB to open r/o, until the plk is manually deleted.

    However, Should DBs for Linux PWS be created as abc.psafe3, or v1.x format for Linux - that's on v1.x? Creating a new DB in Linux PWS shows only psafe3 for format - no other options.

    As I said, I did remove / renamed the existing .plk files & PWS then opens the DB normally, as r/w. It creates another .plk file (I assume) on the next PWS launch. But, the launch after that, PWS can only open the same DB as r/o.

    IIRC, I moved the current DB used in Mint 18.1 from a Windows PWS version. Though I've used that same DB in Linux for months before any r/o warnings. Maybe change in PWS Linux 1.03 (or 1.02) doesn't like something about the DB created under Windows?

    What permissions do .plk files NEED for PWS to delete them when it closes?

    I created a new Linux DB (empty, so far). It used psafe3 extension.
    Closing that new, empty DB deletes the plk file created when opening the DB. Now just need to know which format to export the old DB data to, for Linux PWS use?

     

    Last edit: Brittney Smith 2017-11-30
    • Rony Shapiro

      Rony Shapiro - 2017-11-30
      • The Linux versions are fully compatible with the current V3 file format (the code implementing the core functionality is the same as that of the Windows build).
      • The problem with dangling .plk files has nothing to do with file permissions. It's a matter of the program not always removing them when it should, i.e., a bug.
       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.