diff --git a/src/yggdrasil/admin.go b/src/yggdrasil/admin.go index dea4577..50fdcf9 100644 --- a/src/yggdrasil/admin.go +++ b/src/yggdrasil/admin.go @@ -344,6 +344,11 @@ func (a *admin) listen() { switch strings.ToLower(u.Scheme) { case "unix": a.listener, err = net.Listen("unix", a.listenaddr[7:]) + if err == nil { + if err := os.Chmod(a.listenaddr[7:], 0660); err != nil { + a.core.log.Printf("WARNING:", a.listenaddr[:7], "may have unsafe permissions!") + } + } case "tcp": a.listener, err = net.Listen("tcp", u.Host) default: