Problem description
The x-oss-object-acl request header is missing or has an empty value. PutObjectAcl requires a non-empty, valid Access Control List (ACL) name.
Causes
When you call PutObjectAcl, OSS validates the x-oss-object-acl header. The error is triggered when the header is absent from the request or its value is an empty string.
Examples
The following request triggers the error because x-oss-object-acl has no value:
PUT /test-object?acl HTTP/1.1
x-oss-object-acl:
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 29 Apr 2015 05:21:12 GMT
Authorization: OSS qn6q**************:77Dv****************A valid request sets the header to one of the accepted ACL names:
PUT /test-object?acl HTTP/1.1
x-oss-object-acl: private
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 29 Apr 2015 05:21:12 GMT
Authorization: OSS qn6q**************:77Dv****************Solutions
Set x-oss-object-acl to one of the following values:
| Value | Permissions |
|---|---|
default | The object inherits the ACL of the bucket it belongs to. This is the default. |
private | Only the object owner and authorized users have read and write permissions. All other users have no access. |
public-read | Only the object owner and authorized users have read and write permissions. All other users can read the object. Exercise caution when you set x-oss-object-acl to this value. |
public-read-write | All users have read and write permissions on the object. Exercise caution when you set x-oss-object-acl to this value. |