codegangsta / gin

Live reload utility for Go web servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running: fork/exec /home/hugo/xxx/gin-bin: permission denied

hugows opened this issue · comments

Hello,
I always used gin in this project and somehow I must have changed my environment because I'm having some kind of permissions issue:

hugo@hp ~/Downloads/server $ gin -i cmd/main.go 
[gin] Listening on port 3000
[gin] Building...
[gin] Build finished
2017/08/23 09:40:56 Error running: fork/exec /home/hugo/Downloads/server/gin-bin: permission denied

My server is using go-chi, as always.

I copied my files to another folder and the problem remains. Tried changing the tmp path and didn't help. Go run cmd/main.go works normally. Tried other ports and the problem remains. My app uses PORT env var properly. This worked for weeks until now...

Is "gin-bin" an ELF binary? Shouldn't I be able to run it directly in the shell?

Thanks for any help.

The problem was that I changed my folder structure and go build wasn't generating a binary anymore.
Passing --path . --build cmd/ to gin fixed things.