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()