I am trying to execute a terminal command by just double clicking a .command file. But I am getting this error.
The file “myfile.command” could not be executed because you do not have appropriate access privileges. To view or change access privileges, select the file in the Finder and choose File > Get Info.
I have looked at this answer but it doesn't work: Full privileges on .command file, but it says I don't have appropriate privileges
I tried all of these:
sudo chmod u+x /path/to/myfile.command chmod u+x /path/to/myfile.command chmod u+x docker start sql_server_demo sudo chmod a+x /path/to/myfile.command chmod a+x /path/to/myfile.command chmod a+x docker start sql_server_demo
myfile.command I would have this:
docker start sql_server_demo
Nothing seems to be working. And when I go to
Users and Groups then my
current user does have
Admin rights. So I really don't understand why I am getting this error. Does the
myfile.command's location matter?
ls -la: -rw-r--r--@ 1 (myname) staff 68 Aug 16 11:20 myfile.command
file: myfile.command: ASCII text, with no line terminators