Default permission for atomicupdate should be 0644

This commit is contained in:
Kovid Goyal 2023-03-11 10:04:43 +05:30
parent 83f25cd361
commit 74c5692b78
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -77,7 +77,7 @@ func AtomicWriteFile(path string, data []byte, perm os.FileMode) (err error) {
}
func AtomicUpdateFile(path string, data []byte, perms ...fs.FileMode) (err error) {
perm := fs.FileMode(0o666)
perm := fs.FileMode(0o644)
if len(perms) > 0 {
perm = perms[0]
}