I am running a command ./startup.sh nginx:start
and I am getting this error message zsh: permission denied: ./startup.sh
why could this be happening?
To fix the permission denied error in Linux, one needs to change the file permission of the script. Use the “chmod” (change mode) command for this purpose.
Be sure to give it the execution permission.
cd ~/the/script/folder chmod +x ./startup.sh
This will give exec permission to user, group and other, so beware of possible security issues. To restrict permission to a single access class, you can use:
chmod u+x ./startup.sh
This will grant exec permission only to user
For reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With