0
votes

I am attempting to change the asl of a file (100KB.file) I have within IBM COS: bucket: 'devtest1.ctl-internal.nasv.cos' and am receiving the following message:

An error occurred (AccessDenied) when calling the PutObjectAcl operation: Access Denied

It seems like my AWS credentials (or call) do not have the correct permissions to allow the ACL update.

Command:

aws --endpoint-url=https://s3.us-south.objectstorage.softlayer.net s3api put-object-acl --bucket devtest1.ctl-internal.nasv.cos --key 100KB.file --acl public-read

Return:

An error occurred (AccessDenied) when calling the PutObjectAcl operation: Access Denied

2

2 Answers

0
votes

You haven’t mentioned that you have configured hmac credentials on your bucket, so I’ll assume you haven't. I'm also assuming that operations other than PutObjectAcl do not work for you.

Try adding hmac credentials:

enter image description here

Then ...

enter image description here

Source: https://console.bluemix.net/docs/services/cloud-object-storage/hmac/credentials.html#using-hmac-credentials

0
votes

I am having the same issue as well using the AWS CLI. However, you can do the same operation using cURL and providing your IBM Cloud IAM token.

curl -X "PUT" "https://{endpoint}/{bucket-name}/{object-name}?acl" \
 -H "x-amz-acl: public-read" \
 -H "Authorization: Bearer {token}" \
 -H "Content-Type: text/plain; charset=utf-8" \