How to Fix “File Could Not Be Executed Because You Do Not Have Appropriate Access Privileges” on macOS

If a trusted .command script triggers “File could not be executed because you do not have appropriate access privileges,” it usually needs the execute permission. In Terminal, add that permission for your account with chmod u+x, then run the script again. This changes the file’s permission bit; it does not verify the script or bypass macOS security checks, so inspect the file and trust its source before running it.

Before changing permissions, check the file

Make sure the file really ends in .command and that you know where it came from. A command script can run Terminal commands with your account’s access. If you did not expect the file or cannot verify its source, do not run it. Open it in a text editor to review its contents or get a clean copy from the developer.

Finder’s Get Info window is useful for checking a filename and general sharing permissions, but it does not provide a simple control for adding the shell execute bit to a script. Apple documents chmod as the Terminal method for making a shell script executable in its Terminal User Guide.

Finder Downloads window with script.command selected
Example Finder view of a .command script in Downloads.

Fix the execute permission

  1. Open Terminal. Use Spotlight or open Applications > Utilities > Terminal.
  2. Grant execute permission to your account. For a script in Downloads named script.command, enter this command and press Return:
    chmod u+x "$HOME/Downloads/script.command"
    Replace the example location and filename with the actual path. Keep the path inside quotation marks, especially if a folder or filename contains spaces. You can also type chmod u+x (including the final space) and drag the file from Finder into the Terminal window to insert its path. Do not type the words “path to file” literally.
Terminal with chmod u+x applied to a script.command file in Downloads
The chmod u+x command adds execute permission for the file owner.

The command normally returns to a prompt without printing a success message. u means the file’s owner, and +x adds permission to execute it. This is narrower than making the script executable for every account on the Mac. It should not require an administrator password when you own the file and can change its permissions.

  1. Run the script. If it is in Downloads, enter:
    cd "$HOME/Downloads"
    ./script.command
    You can also double-click the file in Finder after changing its permission. Running it from Terminal is useful because you can read any error message or output. If macOS displays a warning when you paste a command into Terminal, read the warning before proceeding.
Terminal showing ./script.command and example script output
Example Terminal session after running the script from its folder.

Check the permission if the error remains

To see the file’s permissions, run:

ls -l "$HOME/Downloads/script.command"

When the current account owns the file and execute permission is set, the first permission group should include an x, such as -rwx. Apple’s Mac permissions guide explains how file and folder access differs among users.

Terminal ls -l output with an x in the script owner permission bits
Use ls -l to confirm that the owner permission string includes x.
  • The command says “No such file or directory.” The path or filename does not match. In Finder, confirm the name and location, then repeat the command with the correct path.
  • It says “Operation not permitted” or “Permission denied.” You may not own the file, or a parent folder may not allow access. Move a copy into a folder you own, such as Downloads, or ask the file’s owner or your Mac administrator to correct access. Avoid adding sudo as a first step.
  • The file has an execute bit but still will not run. Check that the file is a valid script and that its first line names an available interpreter. If the message refers to an app that Apple cannot check, an unidentified developer, or malware, that is a separate Gatekeeper or malware warning, not an execute-permission error.

Do not weaken macOS security to fix a file permission

Do not use chmod a+x unless you intentionally want other local accounts to have execute permission, and avoid broad commands such as chmod -R or changing permissions across system folders. To undo the execute bit you added for your account, run chmod u-x "$HOME/Downloads/script.command".

For an app verification alert, follow Apple’s guidance for safely opening apps only when you have confirmed the app is from a trustworthy source. Do not override a warning that says software will damage your computer or that macOS detected malware. Apple also documents newer Terminal paste protections in its Terminal and script protections guide.

Leave a Comment

How to Screenshot on Mac: A Comprehensive Guide

How to Screenshot on Mac: A Comprehensive Guide

Learn how to screenshot on Mac with shortcuts for the full screen, an area, or a window, plus the Screenshot app, clipboard, editing, and save-location tips.

How to Add Multiple Images to a Single PDF on macOS

How to Add Multiple Images to a Single PDF on macOS

Combine multiple images into a single PDF on macOS using Finder or Preview. Control page order, avoid cropping, and fix missing pages without extra software.

How to View FPS on macOS: Steam and Apple’s Metal HUD

How to View FPS on macOS: Steam and Apple’s Metal HUD

Learn how to show FPS on a Mac with Steam’s performance overlay or Apple’s Metal Performance HUD, plus fixes when the counter does not appear.

How to Force Quit on a Mac: 5 Quick Ways to Close an App

How to Force Quit on a Mac: 5 Quick Ways to Close an App

Use Option–Command–Esc to force quit an unresponsive Mac app, or close it from the Apple menu, Dock, Activity Monitor, or Terminal.

How to Use Split Screen on Mac: Put Two Apps Side by Side

How to Use Split Screen on Mac: Put Two Apps Side by Side

Set up Split View, resize or replace a pane, use Mission Control, and learn when desktop window tiling is a better fit on your Mac.

How to Remove EXIF Data from Photos on macOS

How to Remove EXIF Data from Photos on macOS

Learn how to remove EXIF data from photos on macOS, hide location in Photos, clean exported JPEG copies with ExifTool, and verify the result.

How to Sync Two Folders on a Mac Safely

How to Sync Two Folders on a Mac Safely

Sync two folders on a Mac with SyncTwoFolders, choose a one-way or two-way update, and preview changes before files are replaced or removed.

How to Back Up a Tumblr Blog on a Mac

How to Back Up a Tumblr Blog on a Mac

Back up a Tumblr blog on your Mac with Tumblr’s web export. Download and unpack the ZIP, keep its posts and media safe, and know what the archive leaves out.

How to Use Google Maps on a Mac Desktop

How to Use Google Maps on a Mac Desktop

Use Google Maps on your Mac in Safari or Chrome, find places and routes, switch map layers, and add a Safari web app to your Dock on macOS Sonoma 14 or later.

5 Best Free WAV to MP3 Converters for Windows and macOS

5 Best Free WAV to MP3 Converters for Windows and macOS

Compare five free WAV-to-MP3 converters for Windows and macOS, including online file limits, local batch tools, and practical export settings.