[GNC] GnuCash 5.11 FlatPak on Linux Mint 21: Software doesn't respect read-only gnucash file
James Thorpe
James at fusionsystems.co.za
Fri Jun 13 02:12:12 EDT 2025
Thank you, R Losey, your explanation allowed me to solve my problem!
To clarify the problem for others - I was trying to create a read-only
copy of a gnucash file so that I could open it to draw reports and get
figures without inadvertently making changes... which happen rather
easily in gnucash.
Here's how I solved it (in Linux, at least... similar process from
windows except using the GUI I suppose).
I created the lock file manually
touch Household_2024_2025.gnucash.LCK
Set the lock file to read-only
chmod a-w Household_2024_2025.gnucash.LCK
Thereafter, any time I opened the main file (Household_2024_2025),
gnucash would prompt me to open read-only... which is exactly what I
wanted. Also, when closing, gnucash is unable to delete the lock file so
the file remains protected.
This works on a network file share as well so when I open from gnucash
on windows the same process happens.
On 2025/06/12 17:59, R Losey wrote:
> The issue is that the directory has write permission, which
> allows files to be renamed.
>
> So, GnuCash reads the read-only file, and then, when it goes to "save"
> the file, it renames the old file and creates a new one. It IS a
> little unusual to have a just-written file NOT have "write"
> permissions; I assume GnuCash just clones the existing permissions.
>
> If you want an archived version, I would copy the appropriate .gnucash
> file to some kind of archive directory... for example, if the path to
> your regular GnuCash files ends with ".../gnucash/", you could create
> a ".../gnucashARCHIVE/" to hold your archive files. The only problem
> is that if you make the directory read-only, you may not be able to
> open the files, as GnuCash couldn't create the log files. There may be
> an option in GnuCash to open a file as read-only (because I know that
> if the LCK file is present, one option is to open the file as read-only).
>
>
> On Thu, Jun 12, 2025 at 1:35 AM James Thorpe
> <James at fusionsystems.co.za> wrote:
>
> Hi All
>
> I'm using Version: 5.11, Build ID: Flathub 5.11-2 on Linux Mint 21
> and I
> recently noticed that even if I set the user permissions on my
> gnucash
> file to read-only (eg. chmod a-w gc.gnucash) and then open the
> file with
> GnuCash, I'm able to update the file from GnuCash and when I close it
> again, I notice the permissions have changed back to rw.
>
> After my chmod command, it looks like this
>
> -r-xr-xr-x 1 james james 86022 Jun 9 14:17 gc.gnucash
>
> If I then open gnucash and this file and make changes, a bunch of
> logs
> etc appear
>
> -rw-r--r-- 1 james james 359 Jun 12 08:26
> gc.gnucash.20250612082607.log
> -r-xr-xr-x 1 james james 86181 Jun 12 08:26 gc.gnucash
> -rw-r--r-- 1 james james 679 Jun 12 08:26
> gc.gnucash.20250612082600.log
> -r-xr-xr-x 1 james james 86022 Jun 12 08:25
> gc.gnucash.20250612082607.gnucash
>
> but the original file gc.gnucash remains read-only. But the
> changes are
> there and have been saved, even if I delete the logs and other files.
>
> Bottom line - I'm trying to save a read-only copy of a file that I'm
> done with and just want for reporting/ reference purposes. How do
> I do that?
>
> I'm guessing it's a flatpak thing because it doesn't seem to do
> this on
> Windows version... even if I access the same file on a shared network
> folder.
>
> thanks for any suggestions.
>
> James Thorpe
>
> On 2025/06/11 18:00, gnucash-user-request at gnucash.org wrote:
> > Send gnucash-user mailing list submissions to
> > gnucash-user at gnucash.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > or, via email, send a message with subject or body 'help' to
> > gnucash-user-request at gnucash.org
> >
> > You can reach the person managing the list at
> > gnucash-user-owner at gnucash.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of gnucash-user digest..."
> >
> >
> > Today's Topics:
> >
> > 1. No longer able to access my accounting software (Mark
> Penner)
> > 2. Re: Suggestion to Accept Bitcoin/Lightning/Monero Donations
> > (David Carlson)
> >
> >
> >
> ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Wed, 11 Jun 2025 09:46:30 -0500 (CDT)
> > From: Mark Penner<mrp at markpenner.space>
> > To:gnucash-user at gnucash.org <mailto:To%3Agnucash-user at gnucash.org>
> > Subject: [GNC] No longer able to access my accounting software
> > Message-ID:<c803383e-3ca8-4752-b5ef-516573f9f783 at markpenner.space>
> > Content-Type: text/plain; charset=UTF-8
> >
> > Jun 11, 2025 05:01:46 Vik Sha via
> gnucash-user<gnucash-user at gnucash.org>:
> >
> >> I keep getting the following messages every time I try to open it :
> > If you're trying to send an image, you need to attach it, the
> mailing list software strips inline images.
> >
> > If the message you're getting says something like "unable to
> obtain lock for file", and you're SURE that the file is not open
> (e.g. in another GnuCash instance), just click "Open Anyway"
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Wed, 11 Jun 2025 09:56:50 -0500
> > From: David Carlson<david.carlson.417 at gmail.com>
> > To: 83281<83281 at protonmail.com>
> > Cc:gnucash-user at gnucash.org <mailto:Cc%3Agnucash-user at gnucash.org>
> > Subject: Re: [GNC] Suggestion to Accept Bitcoin/Lightning/Monero
> > Donations
> > Message-ID:
> >
> <CADYgSbm5FWEK+1vpWTi_XaFfvZ+mGfOAYS9cr8RMj4qBCk5hjQ at mail.gmail.com
> <mailto:CADYgSbm5FWEK%2B1vpWTi_XaFfvZ%2BmGfOAYS9cr8RMj4qBCk5hjQ at mail.gmail.com>>
> > Content-Type: text/plain; charset="UTF-8"
> >
> > I hope the developers can identify whether this is phishing or
> worse!!!!!
> >
> > On Wed, Jun 11, 2025 at 5:02?AM 83281 via gnucash-user <
> > gnucash-user at gnucash.org> wrote:
> >
> >> Hello,
> >>
> >> I hope this message finds you well. I am a supporter of your
> open-source
> >> project GnuCash and would like to make a donation. However, I
> noticed that
> >> you currently do not accept Bitcoin, Lightning, or Monero.
> >>
> >> Privacy is very important to me, as it is to many other
> open-source users
> >> and advocates. Supporting privacy-respecting donation methods
> like Bitcoin
> >> and Monero would likely encourage more people to contribute.
> These options
> >> also operate independently of banks and intermediaries, which
> aligns with
> >> the values of a freer and more open world.
> >>
> >> Would you consider adding the option to donate via Bitcoin
> (on-chain and
> >> maybe even Lightning) or Monero? If you need any assistance
> implementing
> >> this, I would be happy to help.
> >>
> >> The easiest way to get started is by downloading Cake Wallet,
> which is
> >> open-source, non-custodial, and supports both Bitcoin and
> Monero (as well
> >> as other cryptocurrencies). You could then simply display the
> wallet
> >> address on your website for donations.
> >>
> >> Thank you for your work and for considering this suggestion.
> Please let me
> >> know if you have any questions or if I can assist in any way.
> >>
> >> Best regards!
> >> _______________________________________________
> >> gnucash-user mailing list
> >> gnucash-user at gnucash.org
> >> To update your subscription preferences or to unsubscribe:
> >> 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.
> >>
> >
> --
> --
> James Thorpe
> 061 476 2775
> James at fusionsystems.co.za
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> 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.
>
>
>
> --
> _________________________________
> Richard Losey
> rlosey at gmail.com
> Micah 6:8
--
--
James Thorpe
061 476 2775
James at fusionsystems.co.za
More information about the gnucash-user
mailing list