Monday, March 24, 2025

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


I’m a current Home windows refugee with fairly some expertise with UNIX techniques.

I attempted putting in one of many apps I constantly use throughout all of the techniques I’m on – Homebank – by way of their homebrew set up, as suggested by the documentation https://www.gethomebank.org/en/troubleshooting.php#macinstall.

Sadly, after the set up, the applying just isn’t working appropriately.

On condition that it is a gtk software, and launched from the command line, I used to be in a position to choose a few errors from the logs, which gave the impression to be indicating there are issues with permissions to the folder the place non permanent recordsdata are saved by the app (~/.native/shared):

g_rename() failed: Operation not permitted

Judging from the truth that the applying was in a position to create recordsdata within the goal listing, however failing to rename them, it appears just like the file renaming particularly has been shut down.

After some search and debugging, right here what I attempted:

  • be sure that command line is allowed the entry to the disk (Privateness configuraitons)
  • strive working the applying as an admin (sudo)
  • altering the permissions within the Finder (learn and write to workers and to everybody)
  • lastly, I attempted to take away the “quarantine” flag from the homebank app within the homebrew cellar, however it doesn’t appear to have the flag set in precept:
sudo xattr -d com.apple.quarantine homebank
Password: <>
xattr: homebank: No such xattr: com.apple.quarantine

The issue nonetheless persisting, and at this level I’m a bit at loss for concepts as to what I can do to resolve it.

Am I lacking one thing?

Edit: Further data

  • I attempted including homebank binary to the listing of apps allowed full entry to the disk
  • I attempted re-installing homebank as non-quarantined software, simply in case with a brew reinstall homebank --no-quarantine

Right here is the precise MacOS model: 15.2 (24C101)

Right here is the results of the ls -l ~/.native/share command:

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

root owndership is because of me working homebank with a sudo. The appliance appears to be creating a brief file recently-used.xbel. that factors to the opened homebank database file, that it then renames to recently-used.xbel, that it then makes use of on the subsequent opening to load probably the most just lately opened file routinely. And whereas the creation of the file with the random string works properly, the renaming of it fails.

Edit 2: further debug data:

% ls -ld ~/.native/share 
drwxr-xr-x  21   workers  672 Mar 22 18:58 /Customers//.native/share

Edit 3: much more data:

% cd ~/.native/share; ls -a@elO
whole 16
drwxr-xr-x  4   workers  - 128 Mar 22 23:15 .
drwxr-xr-x  4   workers  - 128 Mar 22 10:44 ..
-rw-r--r--  1   workers  - 781 Mar 22 23:15 recently-used.xbel.QECD32
-rw-r--r--  1   workers  - 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