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

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

No files matched your search

+2 -2
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
}