1
1
Fork 0

Update 'main.go'

tightened file permissions, will probably cause issues lol
master
blackout 2 years ago
parent 970aa1fc35
commit f9b20bc1c6

@ -21,19 +21,19 @@ func init() {
// now that we know where to put the log file, we can start output (replace logger)
err = os.MkdirAll(logDir, 0755)
err = os.MkdirAll(logDir, 0700) // changed from 0755
if err != nil {
log.Fatal().Str("directory",logDir).Str("intent","logDir").Err(err)
return
}
err = os.MkdirAll(dbDir, 0755)
err = os.MkdirAll(dbDir, 0700) // changed from 0755
if err != nil {
log.Fatal().Str("directory",dbDir).Str("intent","dbDir").Err(err)
return
}
lf, err := os.OpenFile(logDir+"tcpac.log", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
lf, err := os.OpenFile(logDir+"main-server-access.log", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0640) //
if err != nil {
log.Fatal().Str("logDir",logDir).Err(err).Msg("Error opening log file!")
}

Loading…
Cancel
Save