我们正常把编译过的二进制copy到server的tmp下验证
chmod 777 hello
./hello
会报错:
fork/exec /tmp/go-build584080616/b001/exe/hello: permission denied
原因是:
在go中不认/tmp/目录
将hello 移动到其他目录执行就行了
我们正常把编译过的二进制copy到server的tmp下验证
chmod 777 hello
./hello
会报错:
fork/exec /tmp/go-build584080616/b001/exe/hello: permission denied
原因是:
在go中不认/tmp/目录
将hello 移动到其他目录执行就行了