Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unix socket permissions #385

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,9 @@ func unixSocketListener(bindAddr string) net.Listener {
if err != nil {
logger.Fatal().Err(err).Msg("failed to serve unix socket")
}
// TODO: safe default for now (rwxr-xr-x), could be extracted as env variable if needed
err = os.Chmod(bindAddr, 0755)
// least permissions and work out of box (-w--w--w-); could be extracted as
// env variable if needed
err = os.Chmod(bindAddr, 0222)
if err != nil {
logger.Fatal().Err(err).Msg("failed to set unix socket permissions")
}
Expand Down
Loading