Ask coding questions

← Back to all posts
.replit Run .sh File : Permission denied.
TalinSharma (77)

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

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

This is my 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
To fix it!


Mioun (20)

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

TalinSharma (77)

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