SOLVED: The file .command could not be executed … no 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 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 from screen above “To view or change access privileges, select the file in the Finder and choose File > Get Infodidn’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 file .command could not be executed…”

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 (folders and files) 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. Enter the command the same way as seen above.

You might be asked for admin password.

That’s it! Try to execute the file again and hopefully you won’t wee “.command could not be executed” message again.

If you get the following “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 Read my Story… Please!

1 thought on “SOLVED: The file .command could not be executed … no access privileges”

Leave a Comment