Anonymous users cannot access public-read Objects
After the access control lists (ACLs) of your objects are set to public read, all users can access your objects. However, the following configurations can cause anonymous users to fail to access public-read objects in a bucket:
Pay-by-requester
When the pay-by-requester mode is enabled, the requester pays for the traffic and request fees for reading data in the bucket. The bucket owner pays only for storage fees. Therefore, requesters must provide identity verification information. This allows Alibaba Cloud Object Storage Service (OSS) to identify and charge the requester instead of the bucket owner. Because anonymous users do not provide this information, OSS denies their access requests. For more information, see Pay by requester.
Solutions:
-
Generate a signed URL for the file and provide it to the anonymous user. For instructions, see Use a signed URL to download or preview a file.
-
Disable the pay-by-requester mode. For instructions, see Set the pay-by-requester mode.
Bucket policy is configured
A bucket policy is an authorization policy for buckets in OSS. You can use a bucket policy to allow or deny other users access to your OSS resources. If you configure a bucket policy that restricts anonymous access, anonymous users cannot access the resources. For more information about bucket policies, see Authorize users to access specified resources using a bucket policy.
Solution:
View the bucket policies that you configure for the bucket. Modify or delete the bucket policies that prevent anonymous users from accessing the bucket.