GNOME Bugzilla – Bug 345913
Saving file gives false error report
Last modified: 2018-06-29 21:08:38 UTC
Please describe the problem: When I click "save" in GnuCash 1.9.8 (Debian SID build 1.9.8-2) an error message is displayed, even though the file appears to be correctly saved. Steps to reproduce: 1. Press the "Save" button. Actual results: The error message "You do not have permission to access FILENAME" is displayed. After clicking "Close" the Save dialog box appears. Expected results: The file should be successfully saved with no further interaction from the user. Does this happen every time? Yes Other information: The file is being saved to a samba mounted directory.
Did you see any warning message on the console, like "unable to chmod filename"? Also, gnucash creates a logfile /tmp/gnucash.trace -- does it contain such a message? I guess this whole error because of the SMB share is due to src/backend/file/gnc-backend-file.c line 522, where we chmod() the new file, but (as the comment says there) chmod always fails on vfat and therefore also on samba/SMB. I propose to comment out the qof_backend_set_error in line 522 (and the return FALSE in line 533), just like the one in line 541. @Daniel: Thanks for mentioning the samba issue, that explains the bug immediately. Oh, as a test, could you comment out the abovementioned line 522 in src/backend/file/gnc-backend-file.c , run "make install" in that directory again, and see whether the error message goes away? That would be nice.
Yep - gnucash.trace down contain a error message about not being able to chmod the file. "Warning: gnc_file_be_write_to_file(): unable to chmod filename /mnt/samba/share...".
Fixed in r14452
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=345913. Please update any external references or bookmarks.