My user should have ownership to Sublime.
myusername@Andreass-Mini ~ % ls -l /Applications/Sublime\ Text.app
total 0
drwx------ 8 myusername admin 256 Jun 26 2021 Contents
myusername@Andreass-Mini ~ %
But I cannot execute it:
myusername@Andreass-Mini ~ % /Applications/Sublime\ Text.app
zsh: permission denied: /Applications/Sublime Text.app
But I can open it:
myusername@Andreass-Mini ~ % open /Applications/Sublime\ Text.app
I used 755 and even 777
sudo chmod 755 /Applications/Sublime\ Text.app
And made sure that it’s owned by the current user
myusername@Andreass-Mini ~ % sudo chown -R $(whoami) /Applications/Sublime\ Text.app
The Terminal has full disk access. The file is not locked. But I cannot execute it.
I have several scripts where I need to be able to execute it and open files with it. Can you point me what I missed in order to have the permission to execute it.
>Solution :
/Applications/Sublime\ Text.app is the name of a folder, not an executable file. To run the program from the command line, you need to launch the executable, like this:
/Applications/Sublime\ Text.app/Contents/MacOS/sublime_text