fix: create temp dir perm with `777` (close #1813)

pull/1831/head
Noah Hsu 2022-09-26 14:48:59 +08:00
parent f0181d92cd
commit f86ad1dce4
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ func InitConfig() {
if err != nil {
log.Fatalf("marshal config error: %+v", err)
}
err = ioutil.WriteFile(flags.Config, confBody, 0777)
err = os.WriteFile(flags.Config, confBody, 0777)
if err != nil {
log.Fatalf("update config struct error: %+v", err)
}
@ -59,7 +59,7 @@ func InitConfig() {
if err != nil {
log.Errorln("failed delete temp file:", err)
}
err = os.MkdirAll(conf.Conf.TempDir, 0700)
err = os.MkdirAll(conf.Conf.TempDir, 0777)
if err != nil {
log.Fatalf("create temp dir error: %+v", err)
}