fix: honor system umask for file creates (#12601)

use 0666 os.FileMode to honor system umask
This commit is contained in:
Harshavardhana
2021-07-06 12:54:16 -07:00
committed by GitHub
parent 6503c6ac21
commit 039978640f
4 changed files with 6 additions and 6 deletions

View File

@@ -26,13 +26,13 @@ import (
// AppendFile - appends the file "src" to the file "dst"
func AppendFile(dst string, src string, osync bool) error {
appendFile, err := lock.Open(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
appendFile, err := lock.Open(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666)
if err != nil {
return err
}
defer appendFile.Close()
srcFile, err := lock.Open(src, os.O_RDONLY, 0644)
srcFile, err := lock.Open(src, os.O_RDONLY, 0666)
if err != nil {
return err
}