diff --git a/y/y.go b/y/y.go index df3b8520c..b68246560 100644 --- a/y/y.go +++ b/y/y.go @@ -75,7 +75,7 @@ func CreateSyncedFile(filename string, sync bool) (*os.File, error) { if sync { flags |= datasyncFileFlag } - return os.OpenFile(filename, flags, 0666) + return os.OpenFile(filename, flags, 0600) } // OpenSyncedFile creates the file if one doesn't exist. @@ -84,7 +84,7 @@ func OpenSyncedFile(filename string, sync bool) (*os.File, error) { if sync { flags |= datasyncFileFlag } - return os.OpenFile(filename, flags, 0666) + return os.OpenFile(filename, flags, 0600) } // OpenTruncFile opens the file with O_RDWR | O_CREATE | O_TRUNC @@ -93,7 +93,7 @@ func OpenTruncFile(filename string, sync bool) (*os.File, error) { if sync { flags |= datasyncFileFlag } - return os.OpenFile(filename, flags, 0666) + return os.OpenFile(filename, flags, 0600) } // SafeCopy does append(a[:0], src...).