Skip to content

Change socket properties after creation #202

@oej

Description

@oej
diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go
index 17cb068..d8981d7 100644
--- a/pkg/runner/runner.go
+++ b/pkg/runner/runner.go
@@ -1220,6 +1220,10 @@ func Run(logger *slog.Logger, loggerLevel *slog.LevelVar) {
                        logger.Error("unable to create dnstap unix socket", "error", err)
                        os.Exit(1)
                }
+               err = os.Chmod(startConf.InputUnix, 0775)
+               if err != nil {
+                       logger.Error("unable to chmod dnstap unix socket", "error", err)
+               }
        } else if startConf.InputTCP != "" {
                logger.Info("creating plaintext dnstap TCP socket", "socket", startConf.InputTCP)
                l, err := net.Listen("tcp", startConf.InputTCP)

Could possibly be a config option. This was needed for one of our partners to run EDM on their servers without changing owner/user of the resolver process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions