fix: use dir permissions option for temporary directories

The multipart upload temp directory was created with a hard-coded
0755 mode instead of the configured --dir-perms value, unlike every
other directory creation path in this backend. This caused
inconsistent permissions below bucket directories.

Fixes #2266
This commit is contained in:
Ben McClelland
2026-09-02 14:11:23 -07:00
parent 535cc9d521
commit c0ed55cd3d
+1 -1
View File
@@ -1744,7 +1744,7 @@ func (p *Posix) CreateMultipartUpload(ctx context.Context, mpu s3response.Create
tmppath := filepath.Join(bucket, objdir)
// the unique upload id is a directory for all of the parts
// associated with this specific multipart upload
err = os.MkdirAll(filepath.Join(tmppath, uploadID), 0755)
err = os.MkdirAll(filepath.Join(tmppath, uploadID), p.newDirPerm)
if err != nil {
return s3response.InitiateMultipartUploadResult{}, fmt.Errorf("create upload temp dir: %w", err)
}