Change file permission of config file to 666 😈 when creating it. This is consistent with the log file.

This commit is contained in:
Kleissner
2021-11-28 22:05:27 +01:00
parent 793e586234
commit ffc558b7f2
2 changed files with 3 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ func saveConfig() {
return
}
err = ioutil.WriteFile(configFile, data, 0644)
err = ioutil.WriteFile(configFile, data, 0666)
if err != nil {
Filters.LogError("saveConfig", "writing config '%s': %v\n", configFile, err.Error())
return
@@ -130,7 +130,7 @@ func InitLog() (err error) {
os.MkdirAll(directory, os.ModePerm)
}
logFile, err := os.OpenFile(config.LogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
logFile, err := os.OpenFile(config.LogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) // 666 : All uses can read/write
if err != nil {
return err
}