Commit 6f363153 by Julian Kornberger Committed by Leonard Gram

Adjust permissions of unix socket

fixes #8358
parent e84f746d
...@@ -74,12 +74,15 @@ func (hs *HTTPServer) Start(ctx context.Context) error { ...@@ -74,12 +74,15 @@ func (hs *HTTPServer) Start(ctx context.Context) error {
return nil return nil
} }
case setting.SOCKET: case setting.SOCKET:
ln, err := net.Listen("unix", setting.SocketPath) ln, err := net.ListenUnix("unix", &net.UnixAddr{Name: setting.SocketPath, Net: "unix"})
if err != nil { if err != nil {
hs.log.Debug("server was shutdown gracefully") hs.log.Debug("server was shutdown gracefully")
return nil return nil
} }
// Make socket writable by group
os.Chmod(setting.SocketPath, 0660)
err = hs.httpSrv.Serve(ln) err = hs.httpSrv.Serve(ln)
if err != nil { if err != nil {
hs.log.Debug("server was shutdown gracefully") hs.log.Debug("server was shutdown gracefully")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment