Using the Node.js SDK for IBM Cloud Object Storage, I can successfully create new objects with the public-read ACL setting.
var params = {Bucket: 'bucket', Key: 'key', Body: stream, ACL: 'public-read`};
s3.upload(params, function(err, data) {
console.log(err, data);
});
Files can be accessed without authentication once uploaded.
However, once a file is uploaded, trying to update the ACL permissions to turn a private file to public-read fails with Access Denied errors.
var params = {Bucket: 'bucket', Key: 'key', Body: stream, ACL: 'public-read`};
s3.putObjectAcl(params, function(err, data) {
console.log(err, data);
})
This is the error message return in the response.
{
"errorMessage": "Access Denied",
"errorType": "Error"
}
Retrieving the ACL using getObjectAcl also fails with the same issue.