Saturday, August 9, 2025

command line – Gtk-Warning “g_rename() failed: Operation not permitted” error

I am a recent Windows refugee with quite some experience with UNIX systems.

I tried installing one of the apps I consistently use across all the systems I am on – Homebank – through their homebrew installation, as advised by the documentation https://www.gethomebank.org/en/troubleshooting.php#macinstall.

Unfortunately, after the installation, the application is not working correctly.

Given that it’s a gtk application, and launched from the command line, I was able to pick a couple of errors from the logs, which seemed to be indicating there are problems with permissions to the folder where temporary files are stored by the app (~/.local/shared):

g_rename() failed: Operation not permitted

Judging from the fact that the application was able to create files in the target directory, but failing to rename them, it looks like the file renaming specifically has been shut down.

After some search and debugging, here what I tried:

  • make sure command line is allowed the access to the disk (Privacy configuraitons)
  • try running the application as an admin (sudo)
  • changing the permissions in the Finder (read and write to staff and to everyone)
  • finally, I tried to remove the “quarantine” flag from the homebank app in the homebrew cellar, but it does not seem to have the flag set in principle:
sudo xattr -d com.apple.quarantine homebank
Password: <>
xattr: homebank: No such xattr: com.apple.quarantine

The problem still persisting, and at this point I am a bit at loss for ideas as to what I can do to solve it.

Am I missing something?

Edit: Additional information

  • I tried adding homebank binary to the list of apps allowed full access to the disk
  • I tried re-installing homebank as non-quarantined application, just in case with a brew reinstall homebank --no-quarantine

Here is the exact MacOS version: 15.2 (24C101)

Here is the result of the ls -l ~/.local/share command:

total 128
-rw-r--r--  1 root  staff  781 Mar 22 11:02 recently-used.xbel.0Q0O32
-rw-r--r--  1 root  staff  781 Mar 22 11:30 recently-used.xbel.1HPT32
-rw-r--r--  1 <me>  staff  781 Mar 21 18:16 recently-used.xbel.287922
-rw-r--r--  1 root  staff  781 Mar 22 11:28 recently-used.xbel.63XD32
-rw-r--r--  1 <me>  staff  781 Mar 21 18:17 recently-used.xbel.B0CG32
-rw-r--r--  1 root  staff  781 Mar 22 11:20 recently-used.xbel.C0EM32
-rw-r--r--  1 <me>  staff  781 Mar 22 18:35 recently-used.xbel.D80U32
-rw-r--r--  1 root  staff  781 Mar 22 11:04 recently-used.xbel.FDZJ32
-rw-r--r--  1 root  staff  781 Mar 22 11:29 recently-used.xbel.KAQL32
-rw-r--r--  1 root  staff  781 Mar 22 11:29 recently-used.xbel.L7JP32
-rw-r--r--  1 root  staff  781 Mar 21 18:21 recently-used.xbel.SAMR32
-rw-r--r--  1 <me>  staff  781 Mar 21 20:25 recently-used.xbel.SZO822
-rw-r--r--  1 root  staff  781 Mar 22 11:04 recently-used.xbel.TSWF32
-rw-r--r--  1 <me>  staff  218 Mar 21 18:09 recently-used.xbel.UN5A32
-rw-r--r--  1 <me>  staff  218 Mar 22 11:01 recently-used.xbel.VQEE32
-rw-r--r--  1 <me>  staff  218 Mar 21 18:09 recently-used.xbel.WVPT32

root owndership is due to me running homebank with a sudo. The application seems to be creating a temporary file recently-used.xbel.<random string> that points to the opened homebank database file, that it then renames to recently-used.xbel, that it then uses on the next opening to load the most recently opened file automatically. And while the creation of the file with the random string works well, the renaming of it fails.

Edit 2: additional debug information:

% ls -ld ~/.local/share 
drwxr-xr-x  21 <me>  staff  672 Mar 22 18:58 /Users/<me>/.local/share

Edit 3: even more information:

% cd ~/.local/share; ls -a@elO
total 16
drwxr-xr-x  4 <me>  staff  - 128 Mar 22 23:15 .
drwxr-xr-x  4 <me>  staff  - 128 Mar 22 10:44 ..
-rw-r--r--  1 <me>  staff  - 781 Mar 22 23:15 recently-used.xbel.QECD32
-rw-r--r--  1 <me>  staff  - 781 Mar 22 23:12 recently-used.xbel.TIQT32

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles