Heroku: "bash: ./ start.sh: Permission denied"

I have an application with a Procfile set to run a shell script, but Heroku will not run the script by specifying "Permission denied".

PROCFILE:

web: ./start.sh

start.sh:

#!/usr/bin/env bash
clear;
until node app.js; do
    echo "Server crashed with exit code $?.  Respawning.." >&2
    sleep 1
done

Heroku Magazine:

Starting process with command './start.sh'
bash: ./start.sh: Permission denied
State changed from starting to crashed
Process exited with status 126
+4
source share
1 answer

For this, the following start.shmust be done:

chmod a+x start.sh

If you cannot agree that this will happen on the machine where the file is running, you can invoke it directly with bash; ./start.shuse instead bash ./start.sh(or even just bash start.sh)

+2
source

All Articles