mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
fix: honor system umask for file creates (#12601)
use 0666 os.FileMode to honor system umask
This commit is contained in:
@@ -242,7 +242,7 @@ func formatErasureMigrateV1ToV2(export, version string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(formatPath, b, 0644)
|
||||
return ioutil.WriteFile(formatPath, b, 0666)
|
||||
}
|
||||
|
||||
// Migrates V2 for format.json to V3 (Flat hierarchy for multipart)
|
||||
@@ -284,7 +284,7 @@ func formatErasureMigrateV2ToV3(export, version string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(formatPath, b, 0644)
|
||||
return ioutil.WriteFile(formatPath, b, 0666)
|
||||
}
|
||||
|
||||
// countErrs - count a specific error.
|
||||
|
||||
@@ -241,7 +241,7 @@ func (fs *FSObjects) NewMultipartUpload(ctx context.Context, bucket, object stri
|
||||
return "", err
|
||||
}
|
||||
|
||||
if err = ioutil.WriteFile(pathJoin(uploadIDDir, fs.metaJSONFile), fsMetaBytes, 0644); err != nil {
|
||||
if err = ioutil.WriteFile(pathJoin(uploadIDDir, fs.metaJSONFile), fsMetaBytes, 0666); err != nil {
|
||||
logger.LogIf(ctx, err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ func (jd *tierDiskJournal) Open() error {
|
||||
}
|
||||
|
||||
var err error
|
||||
jd.file, err = os.OpenFile(jd.JournalPath(), os.O_APPEND|os.O_CREATE|os.O_WRONLY|writeMode, 0644)
|
||||
jd.file, err = os.OpenFile(jd.JournalPath(), os.O_APPEND|os.O_CREATE|os.O_WRONLY|writeMode, 0666)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user