From 638c57e4668c63e759b43f5e623240ba739d49e3 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 8 Aug 2022 08:29:37 -0700 Subject: [PATCH] revert changes in FS implementation for umask fixes #15494 --- cmd/fs-v1-multipart.go | 4 ++-- cmd/fs-v1.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/fs-v1-multipart.go b/cmd/fs-v1-multipart.go index 0e836892e..479e748c7 100644 --- a/cmd/fs-v1-multipart.go +++ b/cmd/fs-v1-multipart.go @@ -517,7 +517,7 @@ func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, upload } } - rc, _, err := fsOpenFile(ctx, pathJoin(uploadIDDir, fs.metaJSONFile), 0o666) + rc, _, err := fsOpenFile(ctx, pathJoin(uploadIDDir, fs.metaJSONFile), 0) if err != nil { if err == errFileNotFound || err == errFileAccessDenied { return result, InvalidUploadID{Bucket: bucket, Object: object, UploadID: uploadID} @@ -534,7 +534,7 @@ func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, upload var fsMeta fsMetaV1 json := jsoniter.ConfigCompatibleWithStandardLibrary if err = json.Unmarshal(fsMetaBytes, &fsMeta); err != nil { - return result, err + return result, toObjectErr(fmt.Errorf("unable to parse %s: error %w", pathJoin(uploadIDDir, fs.metaJSONFile), err), bucket, object) } result.UserDefined = fsMeta.Meta diff --git a/cmd/fs-v1.go b/cmd/fs-v1.go index a658b7310..8aa5d29a9 100644 --- a/cmd/fs-v1.go +++ b/cmd/fs-v1.go @@ -867,7 +867,7 @@ func (fs *FSObjects) getObjectInfoNoFSLock(ctx context.Context, bucket, object s // Read `fs.json` to perhaps contend with // parallel Put() operations. - rc, _, err := fsOpenFile(ctx, fsMetaPath, 0o666) + rc, _, err := fsOpenFile(ctx, fsMetaPath, 0) if err == nil { fsMetaBuf, rerr := ioutil.ReadAll(rc) rc.Close()