mirror of
https://github.com/moul/sshportal.git
synced 2025-01-11 01:47:46 +08:00
Set log files mode to 440 instead of 640. (#134)
Set log files mode to 440 instead of 640.
This commit is contained in:
commit
8b2e5daba3
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ func pipe(lreqs, rreqs <-chan *gossh.Request, lch, rch gossh.Channel, logsLocati
|
|||
channeltype := newChan.ChannelType()
|
||||
|
||||
filename := strings.Join([]string{logsLocation, "/", user, "-", username, "-", channeltype, "-", fmt.Sprint(sessionID), "-", time.Now().Format(time.RFC3339)}, "") // get user
|
||||
f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0640)
|
||||
f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0440)
|
||||
defer func() {
|
||||
_ = f.Close()
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue