Fix log dir permission

We need the permission to list files in the dir.
This commit is contained in:
Simon Ser 2020-03-31 22:21:49 +02:00
parent 743540665b
commit 977a1b294f
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -1439,7 +1439,7 @@ func (uc *upstreamConn) appendLog(entity string, format string, a ...interface{}
} }
// TODO: handle/forbid network/entity names with illegal path characters // TODO: handle/forbid network/entity names with illegal path characters
dir := filepath.Join(uc.srv.LogPath, uc.user.Username, uc.network.Name, entity) 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) uc.logger.Printf("failed to log message: could not create logs directory %q: %v", dir, err)
return return
} }