Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terminal error: zsh: permission denied: ./startup.sh

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?

like image 459
Reacting Avatar asked Nov 09 '18 16:11

Reacting


People also ask

How do I fix Permission denied in Linux Terminal?

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.


1 Answers

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

like image 193
Andrea Golin Avatar answered Sep 28 '22 16:09

Andrea Golin