-
Notifications
You must be signed in to change notification settings - Fork 0
Making macOS Scripts Executable
Rafał Karoń edited this page Aug 31, 2024
·
2 revisions
You can only run executable macOS scripts.
- If needed, download a macOS script to run.
- Open Terminal by doing the following:
- Press Cmd and Space.
- Enter
terminal.app
- Press Enter.
- At the prompt, enter
chmod 755 *<script_filepath>*
. Where: <script_filepath> is the path to the script that you want to make executable.
Tip: You can drop a file into Terminal to quickly enter its file path. Example:chmod 755 /users/*<your_user_name>*/Downloads/<script>
- To run the script, double-click the script that you made executable.
- If needed, accept every security prompt. See Accepting macOS Script Security Prompts.
- If the script still does not run, at the prompt, enter
xattr -rc <script_filepath>
. Where: <script_filepath> is the path to the script to make executable.
Example:chmod 755 /users/*<your_user_name>*/Downloads/<script>
- To run the script, double-click the script.
- If needed, accept every security prompt. See Accepting macOS Security Prompts.