Permission Denied

Hello,
Currently, am following up a tutorial on youtube done by pwessel et al. and I got to a point where he plotted 3 map of world using the following scripts;

#!/usr/bin/env bash
gmt begin
gmt subplot begin 3x1 -Ff16c/25c -M0 -A
gmt coast -Rg -JH0 -Gpurple -Bg
gmt coast -Rg -JR0 -Ggreen -Bg -c
gmt coast -Rg -JK0 -Gorange -Bg -c
gmt subplot end
gmt end show

and it plotted 3 world maps with different colours for him but in my case, it says permission denied when I tried running same script. So can some please, assist me on what am doing wrong??

Thanks.

Do you have permissions to run the file? You might need to run chmod +x my_script_name.sh first, before you can run the bash script. See also https://askubuntu.com/questions/29589/chmod-ux-versus-chmod-x.

Yes I do have permission. well, I did run the “chmod +x script_name” and it still says permission denied but funny enough when I changed the scale from 0 to 5 (e.g. I changed JH0 to JH5) it worked anyway thanks for the response.