Skip to content
← Back to Community
.replit Run .sh File : Permission denied.
Profile icon
TalinSharma

I am trying to configure my run button to run a .sh file. In the console it prints:
 ./run.sh
sh: 1: ./run.sh: Permission denied
exit status 126

This is my .replit file:
language = 'bash' run = './run.sh'

This is my run.sh file:
echo Hello World!

How should I fix this?

** I found what the problem was!!! The file wasn't set as executable. I used **

chmod +x run.sh
To fix it!

**Thanks **

Voters
Profile icon
TalinSharma
Comments
hotnewtop
Profile icon
Mioun

actually you don't need to do the command chmod +x run.sh, you just need to change run = './run.sh' to run = 'bash run.sh'

Profile icon
TalinSharma

Oh. Ok! Thanks for the information! I will do the from now on. For now I will keep it as it is!

@Mioun