% ./script.sh zsh: permission denied: ./script.sh
If you are trying to execute a script on the Terminal using the Zsh shell and you get permission denied then make sure that the script has the execute permissions. You can do that by using the ls command.
Adding execute permission to the file:
% ls -ltrh total 2832 -rw-r--r-- 1 code2care staff 5B Jul 19 11:50 script.sh
Use the chmod command to add execute (x) permissions to the script.
chmod +x script.sh
Now if I try to run the script again it works!
% ./script.sh Hello, World!
Have Questions? Post them here!
- How to copy Chrome alert popup text to clipboard - Chrome
- Users experience call quality issue, voice distortion, disconnection with Microsoft Teams call and meeting - Teams
- Convert text to random case using Notepad++ - NotepadPlusPlus
- HTML, HTML5. CSS, CSS3 Color Codes 2020 - Html
- SharePoint Open in the client application document opens in browser - Java