diff --git a/client/cmd/service_controller.go b/client/cmd/service_controller.go index aaea6fa9b04..ee4ecc6f934 100644 --- a/client/cmd/service_controller.go +++ b/client/cmd/service_controller.go @@ -45,6 +45,14 @@ func (p *program) Start(svc service.Service) error { } defer listen.Close() + if split[0] == "unix" { + err = os.Chmod(split[1], 0666) + if err != nil { + log.Errorf("failed setting daemon permissions: %v", split[1]) + return + } + } + serverInstance := server.New(p.ctx, managementURL, configPath, stopCh, cleanupCh) if err := serverInstance.Start(); err != nil { log.Fatalf("failed start daemon: %v", err) diff --git a/client/server/server.go b/client/server/server.go index ca60f8755d5..d6366c5f08e 100644 --- a/client/server/server.go +++ b/client/server/server.go @@ -64,6 +64,7 @@ func (s *Server) Start() error { log.Warnf("no config file, skip connection stage: %v", err) return nil } + s.config = config go func() { if err := internal.RunClient(ctx, config, s.stopCh, s.cleanupCh); err != nil {