mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-16 18:37:51 +01:00
Change file permission of config file to 666 😈 when creating it. This is consistent with the log file.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ func (info *downloadInfo) Finish() (status int) {
|
||||
// initDiskFile creates the target file
|
||||
func (info *downloadInfo) initDiskFile(path string) (err error) {
|
||||
info.DiskFile.Name = path
|
||||
info.DiskFile.Handle, err = os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0666)
|
||||
info.DiskFile.Handle, err = os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0666) // 666 : All uses can read/write
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user