gnc-backend-file.c: ERR_BACKEND_PERM too unspecific

Christian Stimming stimming at tuhh.de
Mon Nov 28 15:43:59 EST 2005


I just recently got a new error message from the gnucash-HEAD that didn't show 
up with 1.8. Here's the deal: I have two linux users accessing the gnucash 
file alternating. The directory of that file has 775 permissions and both of 
them are in the same group, so both are able to write the file in that 
directory.  However, on file saving in 1.8 I always got the PWARN message on 
the cmdline saying that the new user is "unable to chown filename", which was 
quite understandable because the new user cannot chown the previous file that 
was written by the old user. In 1.8 this was a not-too-noisy warning on the 
cmdline.

However, with SVN-HEAD on "save file" this "unable to chown filename" warning 
in  src/backend/file/gnc-backend-file.c:556 results in a ERR_BACKEND_PERM 
error code being passed to gnucash, which will then show a big red error 
window saying "You do not have permission to access  %s\n"! Uh oh! Very 
frightening.

As it turns out, the file saving went just fine. Only the old backup file 
couldn't be chown'd to the new user, because it is still being owned by that 
other user.

Conclusion: This ERR_BACKEND_PERM either needs to be removed from these two 
particular warnings, or these particular warnings need to have (new, 
additional) error codes. That ERR_BACKEND_PERM error message is really meant 
for the case when the actual data file cannot be accessed because of 
permissions, isn't it? This user feedback needs to be crystal clear in such 
respect. Any ideas?

Christian


More information about the gnucash-devel mailing list