Hi everyone.
I don't have experience with socket, I assume I'm missing something.
To start a unix domain socket server (on linux x64), I do the following:
sockDir := "/tmp/mydir"
if _, err = os.Stat(sockDir); os.IsNotExist(err) {
os.Mkdir(sockDir, os.ModeDir)
}
sockName := sockDir + "/" + "mysocket"
ln, err := net.Listen("unix", sockName)
I get: listen unix /tmp/mydir/mysocket: bind: permission denied
Should I create the file for the socket first? With which flags and permissions? Or maybe I shouldn't be doing this in tmp?
Thanks