[Solved] Terminal .command file could not be executed because you do not have appropriate access privileges

Recently I had to run a .command file which came with a cracked app (yes… sometimes I’m a begger), but instead of executing the file I received a message “The file .command could not be executed because you don’t have appropriate access privileges”. That was my first time dealing with such file type, so I got stuck … until I found the solution.

.command file could not be executed

And here it is…

.command – files of this type contain the script, created for Terminal (command line utility in macOS). In reality it’s just a text file which contains plain text shell commands. It’s used for executing Terminal commands automatically as if they were typed at the command line.

The hint “To change access privileges, select the file in the Finder and choose File > Get Info” didn’t help. Even if you set the file permissions to Read&Write (most probably it’s already set by default), you would still receive the same message.

The be able to run .command file you’ll have to set an “execute” permission on it.

Follow the steps below:

STEP 1 First of all, give your file a simple name (something like max.command) and place it in Downloads folder.

STEP 2 Run Terminal app. Then navigate to Downloads folder by using the commands below:
ls- shows the content of current path
cd downloads – opens Downloads folder
cd – go to one level up

STEP 3 Now execute the following line of code as it is (just change the file name to match yours)

chmod u+x max.command
Where u is the owner of the file, +x adds ‘execute’, so u+x gives you (the owner) the ability to execute it.

You might be asked for admin password.

This is it! Now you can double click on your .command file to execute it.

If you get the following message “chmod: max.command: No such file or directory”, check if you navigated to the right folder and specified correct file name.

Share in comments below what made you use .command files.

Subscribe, Share and Donate… Please!

Max Panchuk

Love to discover new technologies. Love to run in the morning through summer forest. Love to play Minecraft with my son. Just being normal...

Geek or Dummy?
Add comment

  1. sudo chmod

    if it says you do not have permission… simply type “sudo” before the chmod etc

    Reply