GNOME Bugzilla – Bug 795821
GnuCash could not obtain the lock for file://C:\Users\username\Documents\GnuCash\2.6.21\xxxx\xxxx.gnucash
Last modified: 2018-06-30 00:09:32 UTC
Created attachment 371684 [details] trace file from 2.6.21 when run with --debug --extra Windows 10 Home 1709 with all available updates GnuCash 2.6.21 + 2.6.15 I'm getting error (see attached): GnuCash could not obtain the lock for file://C:\Users\gordo\Documents\GnuCash\2.6.21\BBGJ20112\BBGJ2012.gnucash. That database may be on a read only file system, or you may not have write permission for the directory. If you proceed you may not be able to save any changes. What would you like to do? [Open Read Only] [Create New File] [Open Anyway] [Quit] There is no LCK file in that directory (I checked while showing hidden and system files). I think therefore that GnuCash cannot write into that directory but I cannot see anything wrong with the security permissions on the file or directory. I CAN create and modify files and directories in that directory (and other directories under Documents) in other applications. I set up this laptop for a relative (including GnuCash 2.6.21) and used Acronis True Image 2013 to clone the hard drive to an SSD. I *think* GnuCash 2.6.21 was working fine before the SSD replaced the HDD. Acronis 2013 does say it is not compatible with Windows 10 but everything else seems to be working fine. I believe the only incompatibility is to do with the Acronis Scheduling services - Acronis was uninstalled after disk cloning. There are no non-ascii characters in any of the paths AFAIK. I have tried: 1) ChkDsk on SSD C: - No errors found 2) Using a different login which had not been used for GnuCash previously 3) Changing login from using Microsoft account back to local account Note that Microsoft is now using just the first 5 letters of the users name as the USERNAME so on the old laptop: C:\Users\gordon, New C:\User\gordo 4) Renaming the .gcm and saved reports files so they would be recreated 5) Renaming C:\Users\gordo\.gnucash to A.gnucash (Windows does not allow renaming a directory to anything starting with dot). 6) Checked GnuCash registry entries for anything strange 7) Checked tracefile from running 2.6.21 gnucash.exe --debug --extra (see attached) - Not sure if that is OK but I cannot see anything obviously wrong. It would be nice if an error code was shown... 8) Reinstalled previous version of GnuCash (2.6.15) and restored data file, gcm and saved reports files 9) Opening Read Only or Open Anyway does not allow me to save a new file anywhere 10) Rebooting (many times). There are no gnucash.exe processes still running. 11) Searching in GnuCash Bugzilla and on internet I haven't tried GnuCash 3.1 yet. Suggestions would be VERY welcome.
Created attachment 371685 [details] Error Msg Screendump
Created attachment 371686 [details] preferences gcm file
Created attachment 371687 [details] Saved Reports file
Found the problem. My Antivirus software (Bitdefender) was blocking gnucash.exe from writing to the data directory under Documents and did not tell me about it. I will be have stern words with them. I had to go into Bitdefender Notifications and saw 1 notification that it had blocked 1 access 2 days ago. Nothing yet about all the times it blocked it yesterday! I had allow access to gnucash.exe in the "Safe Files" configuration. I suggest the following message from the error be changed from: That database may be on a read only file system, or you may not have write permission for the directory. To That database may be on a read only file system, you may not have write permission for the directory, or your anti-virus software is preventing creation of the lock file.
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=795821. Please continue processing the bug there and please update any external references or bookmarks.