• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Writing to shared file

C

cellist

Flightless Bird
I'm using a product call 'GnuCash' on two computers that are connected via a
wireless network. Both computers run Windows/XP sp3 will all the latest
patches installed. For simplicity sake, let's call the two computers DELL and
HP.

The GnuCash database physically resides on the DELL computer's hard drive,
in a folder that is defined as shareable for read and write access. When I
open the file on HP, and GnuCash is not active on DELL, the program issues a
message stating that it is unable to obtain the lock for the database. It
allows opening the file for read-only but states that the HP user will not be
able to make changes to the database.

I've verified, using notepad, that I am able to write to the folder (the one
that resides on DELL) from the HP computer.

Can anyone speculate as to why GnuCash believes that it cannot open the
database for write access on HP when no other instance of GnuCash is running?
What possible sharing settings may I have missed? What sort of OS call might
GnuCash be using to determine that it is unable to write to the file? (It
does use a lock file, which should be present only when the database is
already open for write, which I have verified is NOT present when GnuCash
tries to open on the HP.)

TIA,

Phil
 
P

Paul

Flightless Bird
cellist wrote:
> I'm using a product call 'GnuCash' on two computers that are connected via a
> wireless network. Both computers run Windows/XP sp3 will all the latest
> patches installed. For simplicity sake, let's call the two computers DELL and
> HP.
>
> The GnuCash database physically resides on the DELL computer's hard drive,
> in a folder that is defined as shareable for read and write access. When I
> open the file on HP, and GnuCash is not active on DELL, the program issues a
> message stating that it is unable to obtain the lock for the database. It
> allows opening the file for read-only but states that the HP user will not be
> able to make changes to the database.
>
> I've verified, using notepad, that I am able to write to the folder (the one
> that resides on DELL) from the HP computer.
>
> Can anyone speculate as to why GnuCash believes that it cannot open the
> database for write access on HP when no other instance of GnuCash is running?
> What possible sharing settings may I have missed? What sort of OS call might
> GnuCash be using to determine that it is unable to write to the file? (It
> does use a lock file, which should be present only when the database is
> already open for write, which I have verified is NOT present when GnuCash
> tries to open on the HP.)
>
> TIA,
>
> Phil


http://www.gnucash.org/docs.phtml

"Please send an email to the gnucash-user mailing list if you cannot find a
satisfactory answer to your question within either the Help Manual or the
Concepts Guide. We want feedback from you, it is only through your comments
that we know how to modify the documentation.

Additionally, you can talk to someone via IRC at irc.gnome.org channel
"#gnucash" about your question. Another resource is the English or Deutsch
GnuCash wikis. A wiki is an interactive website where registered users can
ask and answer questions."

http://wiki.gnucash.org/wiki/FAQ#Q:...ltiple_users.3F__Maybe_via_the_SQL_backend.3F

"Q: Can I use GnuCash with multiple users? Maybe via the SQL backend?

A: The obsolete postgresql backend doesn't support the business features,
which is usually the driving desire for multi-user support.

Until 2.4 is released the only recommended multi-user setup right now is
through a shared file. Note that this will enforce serialized, exclusive
access to the data file and editing; there is no real support for simultaneous
editing. File-locking is employed on this file, so it should be NFS-safe.
SMB-safe locking is unknown. <--- Hmmm.

Even the dbi (SQL) backend which will appear in the upcoming 2.4 release
is currently not designed for true multi-user access. Trying to work with
multiple users at the same time in the same database can cause data loss.
You can however share the database with different users, provided you ensure
serialized, exclusive access. In other words, only one user at the time
should have GnuCash open with that database. Once this users closes his
GnuCash session, another user can start GnuCash on this database."

I expect the issue with this software product, would be up-to-date documentation.
In the manner of "grasping at straws", if they really don't know how to
do file locking across SMB, you could consider installing NFS on your systems.

http://en.wikipedia.org/wiki/Server_Message_Block

It is possible your question would have to go to one of their developers.
If the Windows version is a port of the Linux/Unix version, there could
well be porting differences that change the behavior of the program,
with respect to issues of this type. For example, if the person doing
the Windows port, recognizes the need for a file lock, and knows how to
do it properly, that person may have used a different method than was
used in the original Linux code. Without detailed documentation, a developer
likely knows the answer to your question.

Paul
 
C

cellist

Flightless Bird
Thanks for your reply, Paul.

I've already posted the issue on the GnuCash mail list and have received a
number of replies. Just about the only issue that remains is the possibility
that I don't have proper Windows permissions for the folder and/or the file.
But I've given "full control" access to user "everyone" and the behavior
seems to be the same as before. I'm hoping some further reply either here or
at the GnuCash forum will point to a possible solution.

Phil

"Paul" wrote:

> cellist wrote:
> > I'm using a product call 'GnuCash' on two computers that are connected via a
> > wireless network. Both computers run Windows/XP sp3 will all the latest
> > patches installed. For simplicity sake, let's call the two computers DELL and
> > HP.
> >
> > The GnuCash database physically resides on the DELL computer's hard drive,
> > in a folder that is defined as shareable for read and write access. When I
> > open the file on HP, and GnuCash is not active on DELL, the program issues a
> > message stating that it is unable to obtain the lock for the database. It
> > allows opening the file for read-only but states that the HP user will not be
> > able to make changes to the database.
> >
> > I've verified, using notepad, that I am able to write to the folder (the one
> > that resides on DELL) from the HP computer.
> >
> > Can anyone speculate as to why GnuCash believes that it cannot open the
> > database for write access on HP when no other instance of GnuCash is running?
> > What possible sharing settings may I have missed? What sort of OS call might
> > GnuCash be using to determine that it is unable to write to the file? (It
> > does use a lock file, which should be present only when the database is
> > already open for write, which I have verified is NOT present when GnuCash
> > tries to open on the HP.)
> >
> > TIA,
> >
> > Phil

>
> http://www.gnucash.org/docs.phtml
>
> "Please send an email to the gnucash-user mailing list if you cannot find a
> satisfactory answer to your question within either the Help Manual or the
> Concepts Guide. We want feedback from you, it is only through your comments
> that we know how to modify the documentation.
>
> Additionally, you can talk to someone via IRC at irc.gnome.org channel
> "#gnucash" about your question. Another resource is the English or Deutsch
> GnuCash wikis. A wiki is an interactive website where registered users can
> ask and answer questions."
>
> http://wiki.gnucash.org/wiki/FAQ#Q:...ltiple_users.3F__Maybe_via_the_SQL_backend.3F
>
> "Q: Can I use GnuCash with multiple users? Maybe via the SQL backend?
>
> A: The obsolete postgresql backend doesn't support the business features,
> which is usually the driving desire for multi-user support.
>
> Until 2.4 is released the only recommended multi-user setup right now is
> through a shared file. Note that this will enforce serialized, exclusive
> access to the data file and editing; there is no real support for simultaneous
> editing. File-locking is employed on this file, so it should be NFS-safe.
> SMB-safe locking is unknown. <--- Hmmm.
>
> Even the dbi (SQL) backend which will appear in the upcoming 2.4 release
> is currently not designed for true multi-user access. Trying to work with
> multiple users at the same time in the same database can cause data loss.
> You can however share the database with different users, provided you ensure
> serialized, exclusive access. In other words, only one user at the time
> should have GnuCash open with that database. Once this users closes his
> GnuCash session, another user can start GnuCash on this database."
>
> I expect the issue with this software product, would be up-to-date documentation.
> In the manner of "grasping at straws", if they really don't know how to
> do file locking across SMB, you could consider installing NFS on your systems.
>
> http://en.wikipedia.org/wiki/Server_Message_Block
>
> It is possible your question would have to go to one of their developers.
> If the Windows version is a port of the Linux/Unix version, there could
> well be porting differences that change the behavior of the program,
> with respect to issues of this type. For example, if the person doing
> the Windows port, recognizes the need for a file lock, and knows how to
> do it properly, that person may have used a different method than was
> used in the original Linux code. Without detailed documentation, a developer
> likely knows the answer to your question.
>
> Paul
> .
>
 
Top