Problem
Since April 2023, AWS S3 creates all new buckets with ObjectOwnership: BucketOwnerEnforced
by default, which disables ACLs entirely. uploadfs always sends ACL: 'public-read'
(or whatever bucketObjectsACL is set to) in every copyIn, enable, and disable call,
causing all uploads to fail with:
AccessControlListNotSupported: The bucket does not allow ACLs
Root Cause
In lib/storage/s3.js, the ACL param is always included in requests:
// copyIn
const params = {
Bucket: bucket,
ACL: bucketObjectsACL, // always sent, no way to disable
...
};
// enable / disable also always call PutObjectAclCommand
Expected Behavior
It should be possible to pass bucketObjectsACL: false (and disabledBucketObjectsACL: false)
to skip sending ACL headers entirely, for use with modern S3 buckets or S3-compatible
storage that does not support ACLs.
Suggested Fix
bucketObjectsACL = options.bucketObjectsACL === false
? false
: (options.bucketObjectsACL || 'public-read');
disabledBucketObjectsACL = options.disabledBucketObjectsACL === false
? false
: (options.disabledBucketObjectsACL || 'private');
Then in copyIn, enable, and disable — skip ACL if value is false.
This is fully backward compatible — existing users who don't set these options
get the same public-read default as before.
Related
Problem
Since April 2023, AWS S3 creates all new buckets with
ObjectOwnership: BucketOwnerEnforcedby default, which disables ACLs entirely. uploadfs always sends
ACL: 'public-read'(or whatever
bucketObjectsACLis set to) in everycopyIn,enable, anddisablecall,causing all uploads to fail with:
Root Cause
In
lib/storage/s3.js, theACLparam is always included in requests:Expected Behavior
It should be possible to pass
bucketObjectsACL: false(anddisabledBucketObjectsACL: false)to skip sending ACL headers entirely, for use with modern S3 buckets or S3-compatible
storage that does not support ACLs.
Suggested Fix
Then in
copyIn,enable, anddisable— skip ACL if value isfalse.This is fully backward compatible — existing users who don't set these options
get the same
public-readdefault as before.Related