The file is not marked executable, or you are writing where you may not
A downloaded or freshly written script has no execute bit, so running it directly fails even though the contents are fine. The same message also appears when a tool tries to write into a directory you do not own — read-only reference directories are the classic case.
For a script: chmod +x script.sh, or run it as bash script.sh. If it is a write failure, point the tool's output somewhere you own — many tools default to writing next to their input, which fails on shared reference data.