Gnucash thinks data file is read-only, how to open it for writing?
John Ralls
jralls at ceridwen.us
Thu Jul 18 12:34:31 EDT 2013
On Jul 17, 2013, at 6:13 PM, Ben Finney <ben+gnome at benfinney.id.au> wrote:
> John Ralls <jralls at ceridwen.us> writes:
>
>> You can use the sqlite3 command-line tool to remove the lock:
>> sqlite> DELETE FROM gnclock;
>> sqlite> ^D
>
> That table has no entries:
>
> $ sqlite3 foo.gnucash
> […]
> sqlite> SELECT COUNT(PID) FROM gnclock;
> 0
>
> I've run the command you suggest, above, and the behaviour doesn't
> change. Gnucash still treats the file as read-only.
>
>
> Shutting down the program (e.g. by turning off the machine) while the
> lock is still held is surely not uncommon. This manual intervention is
> not an optimal way for handling this for the user.
>
> Can I request someone who has an account in the bug tracking system to
> please submit this as requests for improvement:
>
> * Mention the file-locking behaviour in the FAQ, so it can be found when
> this problem occurs.
>
> * Improve the file opening process to break a stale lock (maybe with a
> prompt to the user), so this manual SQL-level intervention is not
> required.
>
> Thanks for your help and (in advance) with getting this improvement
> requested.
>
>
> But apart from that, the lock still seems to be held on this file
> despite the suggested work-around. Any more information I can dig out of
> it to diagnose and fix?
>
As Colin pointed out, it's *supposed* to offer to break the lock for you. Since
you've now proven that the lock isn't set, that is of course not happening.
Colin has followed up with a request for more details, to which I'll add:
Don't forget to look at /tmp (or maybe /usr/tmp)/gnucash.trace to see it
there are any relevant error messages.
Regards,
John Ralls
More information about the gnucash-user
mailing list