Problem scenario
You have a file that is in an executable directory. This file allows a user to execute it.
You run a command, but you get something like this as the output:
/usr/bin/foobar: line 1: syntax error near unexpected token `<'
/usr/bin/foobar: line 1: `<html><body>You are being <a href="https://objects.githubusercontent.com/github-production-release-asset-abcd/123456789/1234568d-5290-4412-bb2b-abcd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWABCD1234%2F20220113%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200113T184113Z&X-Amz-Expires=300&X-Amz-Signature=79cfe429ab0794f4ef1234fd567891cc2ae0a0d2513abcdefgaa97b37e681a856&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=59522149&response-content-disposition=attachment%3B%20filename%3Dfoobar_linux_arm64&response-content-type=application%2Foctet-stream">redirected</a>.</body></html>'
What should you do?
Solution
Check the contents of the binary file you are running. Is it just text or is it a binary file? You maybe expected a binary file, but accidentally got some incorrect content. It may be worthwhile investigating the download step or the file or program that created the file that is producing the error above.