Tool Permission fixer for Mac and Linux

5.00 star(s) 1 Vote

taler

Well-Known Member
Oct 5, 2017
1,480
1,128
run the xattr -l again. Is the quarantine still there?

What happens when you run
open <app>
from Terminal?
xattr -l outputs nothing.

open gets me:

LSOpenURLsWithRole() failed with error -10810 for the file /Users/aaa/Downloads/g/Pharmacist's Memory.app.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
xattr -l outputs nothing.

open gets me:

LSOpenURLsWithRole() failed with error -10810 for the file /Users/aaa/Downloads/g/Pharmacist's Memory.app.
Error -10810 shows up a lot; what it means is unclear. I've had the same issue where something absolutely refuses to run, and I don't know why.

Try running it from another directory; ~/Downloads isn't really in ~/Downloads - it's a special directory.

If that doesn't work, try
open <app>/Contents/MacOS/<app script>.
 

Phoeniix

Member
Oct 24, 2017
296
375
It fixes permissions for any Mac app. Just Linux Ren'Py for now.

I went with everything in the lib directories because there are more than 1 executable. Ecchi Sensei Day 4 has EcchiSensei, python, pythonw, zsync, zsyncmake and a bunch of .so files. Not to mention lib and eggs subdirectories. I figured it was easier than trying to figure out which files really needed +x.
I agree with your philosophy, to spend hours on making a sophisticated piece of software when nobody is paying you would be silly...unless you do it just because you want to. However I would advise a disclaimer of responsibility. This would be an easy way for someone to activate a malicious exploit... just saying, some people out there are are jerks, and others are ignorant.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
I agree with your philosophy, to spend hours on making a sophisticated piece of software when nobody is paying you would be silly...unless you do it just because you want to. However I would advise a disclaimer of responsibility. This would be an easy way for someone to activate a malicious exploit... just saying, some people out there are are jerks, and others are ignorant.
An interesting thought, but if someone makes an exploit, they could easily turn executable permission on themselves. I don't think that's an issue.
 

Phoeniix

Member
Oct 24, 2017
296
375
An interesting thought, but if someone makes an exploit, they could easily turn executable permission on themselves. I don't think that's an issue.
I was thinking more of them overusing the script outside of f95 content ...just a suggestion to protect yourself in this "sue crazy" age we live in.
 

buff

Well-Known Member
May 29, 2017
1,001
1,508
goobdoob , please apply this patch. This will cause your command to fix perms on RPGMaker apps as well. (They hide a bunch of helpers all around the framework area.)


Code:
--- fixperm 0.1.command    2019-01-18 00:38:28.000000000 -0600
+++ fixperm 0.2.command    2019-12-15 17:55:39.000000000 -0600
@@ -62,6 +62,10 @@
     if [ -e Contents/MacOS ]; then
         echo "Fixing Mac permissions"
         chmod -R +x Contents/MacOS
+
+    #Some frameworks, e.g. RPGMaker, hide helper apps all over the place
+    #This line fixes those too
+        find `find . -name MacOS ` -type f |xargs chmod a+x
     fi
    
     # Fix Linux permissions for Ren'Py games
@@ -82,4 +86,4 @@
     fi
 }
 
-fixperm
\ No newline at end of file
+fixperm
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
Is this line best?
Code:
+        find `find . -name MacOS ` -type f |xargs chmod a+x
2 finds, looking for files named "MacOS" or in directories named "MacOS"?

Wouldn't chmod -R be better than a 2nd find?

Looking in Lust Epidemic, I found this:
./Contents/MacOS
./Contents/Frameworks/nwjs Helper.app/Contents/MacOS
./Contents/Frameworks/nwjs Helper NP.app/Contents/MacOS
./Contents/Frameworks/nwjs Helper EH.app/Contents/MacOS

I could add in
chmod -R +x Frameworks/*/Contents/MacOS
and dispense with the find completely.

Forgot to tag buff to get his reply. Hopefully it won't include a bunch of MK 84s! :p
 
Last edited:
  • Like
Reactions: Phoeniix

buff

Well-Known Member
May 29, 2017
1,001
1,508
Is this line best?
Code:
+        find `find . -name MacOS ` -type f |xargs chmod a+x
2 finds, looking for files named "MacOS" or in directories named "MacOS"?

Wouldn't chmod -R be better than a 2nd find?

Looking in Lust Epidemic, I found this:
./Contents/MacOS
./Contents/Frameworks/nwjs Helper.app/Contents/MacOS
./Contents/Frameworks/nwjs Helper NP.app/Contents/MacOS
./Contents/Frameworks/nwjs Helper EH.app/Contents/MacOS

I could add in
chmod -R +x Frameworks/*/Contents/MacOS
and dispense with the find completely.

Forgot to tag buff to get his reply. Hopefully it won't include a bunch of MK 84s! :p
Pffft, too much hassle, just launch an ALCM from a few hundred klicks and call it a day. Besides, who knows what kind of AAA you might have over there.

Just globbing for stuff under Frameworks will indeed work for the specific case of RPGMaker. But that being said-- I'd keep the double find. Assuming the working directory is correct, it will guarantee that every subfolder named MacOS is hit, regardless of what kind of strange things someone throws in the future. (And even leaving out unknown apps, RPGMaker itself is not exactly known for keeping it's various versions compatible with one another.) Generalization is good.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
Any help on getting https://f95zone.to/threads/wicked-rouge-v0-5-1-fidless.38341/ to work in Catalina? Removed quarantine, moved to applications, ran buff's patch, didn't work.
I'm on Mojave because of the 32 bit nonsense in Catalina, so I can't do any testing.

The problem might be a 32 bit app, or a permissions issue.

If it's a permissions issue, Permission Fixer might fix it.

If it's a 32 bit app issue, you could try the RPGM version in https://f95zone.to/threads/rpg-maker-mv-v1-62-linux-mac-and-windows.31352/ .

Another option is to put the www folder on a web server (like your personal web server on your Mac - I don't know how to do this) and play in a browser.
 

taler

Well-Known Member
Oct 5, 2017
1,480
1,128
Thanks, I didn't try the webserver but the other suggestions didn't work, oh well. Guess I'll use an emulator.
 

ohcmonrest

Member
Jul 22, 2017
400
300
How do I actually launch this? I double click it and try and open it with the terminal but only a brief terminal screen appears before immediately closing. I don't know where to start on running a .command file in the terminal directly. Lubuntu 20.04, trying it with Mother Load.
 

Blissh

New Member
Dec 26, 2019
2
0
How do I actually launch this? I double click it and try and open it with the terminal but only a brief terminal screen appears before immediately closing. I don't know where to start on running a .command file in the terminal directly. Lubuntu 20.04, trying it with Mother Load.
Rename "permissionfixer.command" to -> "permissionfixer.sh", then just run: sh ./permissionfixer.sh

then, just copy/paste the path to your game folder, mine is /home/myuser/mygame
 

3DbPNuRHhpW

Member
Jan 19, 2019
391
488
On linux the `file' command could indicate whether it's an executable.
Except that it produces human-readable output, which can be confusing to parse.
Instead, I wrote some Perl code to identify exactly what files to fix (attached).
 

picobyte

Active Member
Oct 20, 2017
639
670
I can read perl but I find this script complex. But if it works for you.. Not sure how you intend to run exefix.pl. Take care however that the script doesn't wreck your system, if run with a wrong path.
 
5.00 star(s) 1 Vote