Skip to content

Commit

Permalink
Set local unix socket permissions to rw (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini authored Mar 13, 2022
1 parent d7b69b9 commit b2f4322
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/cmd/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions client/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b2f4322

Please sign in to comment.