Open read-only - how?
Robert Heller
heller at deepsoft.com
Sun Apr 25 16:57:46 EDT 2010
At Sun, 25 Apr 2010 15:31:31 -0400 Phillip Richcreek <pwrichcreek at gmail.com> wrote:
>
> Paul:
>
> >When I choose "open anyway", I'm able to write to the file. Of
>
> During my testing on file sharing (see Sharing Database - Windows/XP
> (RESTATED) and Sharing Database - Windows/XP), I encountered the
> situation where choosing the Open Anyway option resulted in the file
> being opened for read-only. When I finally got the GnuCash file
> locking mechanism to correctly recognize that both of the computers on
> my network should have read-write access to the database, I failed to
> go back and thoroughly test the case where one computer had the file
> open and the other also tried to open it, to verify that the second
> computer had read-only access and could not modify the data.
>
> After seeing your entry here, I went back and tested that case and
> found that, indeed, the second computer is permitted to open the file
> and make changes to it, even though another computer has it open.
> Looking at the text of the unable to obtain lock message, I realize it
> makes it pretty clear that you SHOULD NOT Open Anyway.
>
> Geert:
>
> Apparently the read-only behavior was a "benefit" of not having
> Windows write permission to the file on one of the computers. Once the
> write permission was defined, that behavior disappeared.
>
> Does this ring true? Is there any way to let the second computer read
> the file but not be able to modify it, when another computer has the
> file open? Perhaps a GnuCash command-line parameter? If not, it might
> be safer to not even offer the Open Anyway option.
The 'Open Anyway' is there in case something not otherwise handled
happened: such as GnuCash (or the computer) crashing and leaving the
lock file behind. Taking out the 'Open Anyway' option would require
people to know how to manually remove an extrainious lock file.
Otherwise, you'd end up with an inaccessable GnuCash database everytime
something crashed (including shutting down the computer without cleanly
exiting from GnuCash or in case of a power failure, etc.).
It is just necessary for people to make sure NOT to select 'Open Anyway'
when they really shouldn't: in the case where another computer or user
really has the file open. That is, the *documentation* should be very
clear about this.
>
> Thanks,
>
> Phil(R)
>
> > From: "Paul A." <abrahams at acm.org>
> > Subject: Open read-only - how?
> > To: gnucash-user at gnucash.org
> > Message-ID: <1272155358334-2063947.post at n4.nabble.com>
> > Content-Type: text/plain; charset=us-ascii
> >
> >
> > The three options I see are:
> > Â Open anyway
> > Â Create new file
> > Â Quit
> > I don't see anything about read-only opening -- either under Linux or under
> > Windows. Â When I choose "open anyway", I'm able to write to the file. Â Of
> > course, it's essential that I ensure that the file is open only on one
> > computer.
> >
> > --
> > View this message in context: http://gnucash.1415818.n4.nabble.com/Sharing-Database-Windows-XP-RESTATED-tp2062522p2063947.html
> > Sent from the GnuCash - User mailing list archive at Nabble.com.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
More information about the gnucash-user
mailing list