简体   繁体   中英

How to fix Shell Script Invocation Error MapFileParser.sh: Permission denied in Xcode

I'm working on a IOS Game that I built using Unity and I'm trying to get it to build on Xcode. However I keep getting this Shell Script Invocation Error "/Users/masterolu/Downloads/ShoeJackCityBuilds/iOS/MapFileParser.sh: Permission denied".

I've tried to use chmod +x /Users/masterolu/Downloads/ShoeJackCityBuilds/iOS/MapFileParser.sh but for some reason my machine doesn't recognize the chomd command anymore. I tried to reinstall it by using sudo apt install --reinstall coreutils but in order to use apt I need a JDK(Java Developer Kit). So I install the latest JDK and when I try to reinstall chomd my terminal says "Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home/bin/apt" (-1)". At this point I decided it's best to come and ask for help.

Any ideas on how to fix this error in Xcode or how to install chomd so my app can run?

So, apparently Apple likes to disable the execution permission of all the shell scripts that have not been created on your machine (ie downloaded from web, cloned from repo) so what you have to do is to open a terminal inside the project folder and run chmod -x MapFileParser.sh , that should fix it.

I have also done it on the process_symbols.sh just to be sure it runs.

## EDIT ##

My solution for my gihub action was this as the -x version did not work correctly for my scenario.

- name: Update scripts permissions
  run: |
    pwd
    sudo chmod 755 MapFileParser.sh
    sudo chmod 755 process_symbols.sh

This works for me: chmod 777 MapFileParser.sh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM