fix: add unix socket file permission setting (755 -> 660) (#5849)

pull/5850/head
wndnjs0 1 month ago committed by GitHub
parent 88cb58ab64
commit 0fc1dab28b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save