From 977a1b294fcd3940695e609614303e55153ba784 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 31 Mar 2020 22:21:49 +0200 Subject: [PATCH] Fix log dir permission We need the permission to list files in the dir. --- upstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream.go b/upstream.go index 635f620..5614f7d 100644 --- a/upstream.go +++ b/upstream.go @@ -1439,7 +1439,7 @@ func (uc *upstreamConn) appendLog(entity string, format string, a ...interface{} } // TODO: handle/forbid network/entity names with illegal path characters dir := filepath.Join(uc.srv.LogPath, uc.user.Username, uc.network.Name, entity) - if err := os.MkdirAll(dir, 0600); err != nil { + if err := os.MkdirAll(dir, 0700); err != nil { uc.logger.Printf("failed to log message: could not create logs directory %q: %v", dir, err) return }