Lock problem with samba share and encfs

Igor Testen bulk at itesten.com
Thu Feb 16 11:22:59 EST 2012


Hi!

I'm having a small, but rather annoying problem with saving files to a 
networked drive (samba), which has been encrypted using encfs. On 
starting, GnuCash (started with --logto stdout --extra) complains with 
the following message:

"GnuCash could not obtain lock for file <...>. The database may be in 
use by another user <...>.

The command line shows:

"* 17:10:26  WARN <GLib> Failed to read from child watch wake up pipe: 
Interrupted system call"

Now if I look in the directory where the file resides, there is no other 
file present. I open the file "anyway", add a transaction and try to save.

GnuCash now complains that it "Could not make a backup of the file 
<filename>". The commandline states:

"* 17:12:15  WARN <gnc.backend> [gnc_int_link_or_make_backup()] unable 
to make file backup from <filename> to 
<filename>.20120216171215.gnucash: Permission denied

  I choose "Close", which is the only option, enter a new file name in 
the following "Save" dialog and click on "Save".

A new dialog appears: "GnuCash could not obtain the lock for 
<new_filename>. That database may be in use by another user, in which 
case you should not save the database. Do you want to proceed with 
saving the database?" The command line states:

"* 17:13:43  WARN <Gtk> Unable to retrieve the file info for 
`file://<new_filename>': Error stating file '<new_filename>': No such 
file or directory"

If I select "Save", the dialog box disappears, but the file isn't 
actually saved. The command line states:
"* 17:15:01  CRIT <gnc.engine.sx> gnc_sx_get_sxes_referencing_account: 
assertion `sxactions != NULL' failed"


System Information:

I'm using GnuCash-2.4.10 on Gentoo-Linux. The location which I'm trying 
to save to is made available via samba and is mounted using the 
following line in /etc/fstab:

//192.168.0.2/ps on /mnt/samba_ps type cifs (rw,mand)

The host for the share is also a linux computer. The location which is 
made available via samba however is a bit special in that it is a mount 
point for encfs (i.e. this directory then shows the unencrypted data). 
Please note that the encryption is on host only.

My thoughts:

I'm assuming then that there seems to be an issue with how locking 
works. Initially I thought that there is a problem with permissions, 
however when creating transactions, GnuCash creates .log files in the 
same directory. Furthermore a second samba share with the same 
permissions does not have this problem.

Saving to a local encfs mount point also works without any problems.

Did anyone have a similar problem? How could I get to the bottom of the 
problem?


Regards. Igor


More information about the gnucash-user mailing list