fix: add unix socket file permission setting (755 -> 660) (#5849)
This commit is contained in:
parent
88cb58ab64
commit
0fc1dab28b
1 changed files with 8 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"log/slog"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
|
@ -108,6 +109,13 @@ func (s *Server) Start(ctx context.Context) error {
|
|||
return errors.Wrap(err, "failed to listen")
|
||||
}
|
||||
|
||||
if network == "unix" {
|
||||
if err := os.Chmod(address, 0660); err != nil {
|
||||
_ = listener.Close()
|
||||
return errors.Wrap(err, "failed to chmod socket")
|
||||
}
|
||||
}
|
||||
|
||||
// Start Echo server directly (no cmux needed - all traffic is HTTP).
|
||||
s.httpServer = &http.Server{Handler: s.echoServer}
|
||||
go func() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue