“ZSH: Erlaubnis abgelehnt” Code-Antworten

ZSH: Erlaubnis abgelehnt

% ./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.

% ls -ltrh
total 2832
-rw-r--r--  1 code2care  staff     5B Jul 19 11:50 script.sh
Adding execute permission to the file:
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!
Kind Kangaroo

ZSH: Erlaubnis abgelehnt

bash startup.sh
Black Bee

Ähnliche Antworten wie “ZSH: Erlaubnis abgelehnt”

Fragen ähnlich wie “ZSH: Erlaubnis abgelehnt”

Weitere verwandte Antworten zu “ZSH: Erlaubnis abgelehnt” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen