centos6 – fork/exec /tmp/go-build310306422/b001/exe/main: permission denied

I am using Cpanel an logged in to WHM to install go on the terminal. I checked if go was installed with the go version command and it seems to be installed correctly. So I used the terminal to navigate to the folder where I have my main.go and I also have a go.mod file in that folder inside the public_html. But when I run go run main.go I get the following error

fork/exec /tmp/go-build310306422/b001/exe/main: permission denied

We are using the root account so shouldn’t it have all permissions? CentOS 6 with cloud linux according to our server provider. What could be the cause of this?