OSS 403问题
OSS 403指OSS返回的HTTP状态码是403,可以简单的理解为没有权限访问,服务器收到请求但拒绝提供服务。OSS 403错误及原因如下表:
错误 | 错误码错误信息 | 错误原因 | 解决办法 |
SignatureDoesNotMatch | ErrorCode: SignatureDoesNotMatchErrorMessage: The request signature we calculated does not match the signature you provided. Check your key and signing method. | 客户端和服务计算的签名不符 | OSS 403错误及排查 |
PostObject | ErrorCode: AccessDeniedErrorMessage: Invalid according to Policy: Policy expired.ErrorCode: AccessDenied ErrorMessage: Invalid according to Policy: Policy Condition failed: … | PostObject中Policy无效 | PostObject |
Cors | ErrorCode: AccessForbiddenErrorMessage: CORSResponse: This CORS request is not allowed. This is usually because the evalution of Origin, request method / Access-Control-Request-Method or Access-Control-Requet-Headers are not whitelisted by the resource’s CORS spec. | CORS没有配置或配置不对 | OSS设置跨域访问 |
Refers | ErrorCode: AccessDeniedErrorMessage: You are denied by bucket referer policy. | 请检查Bucket的Referer配置 | OSS防盗链 |
AccessDenied | 见以下权限常见错误 | 无权限 | 下面详细讲述 |
序号 | 错误 | 原因 |
1 | ErrorCode: AccessDeniedErrorMessage: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. | Bucket和Endpoint不符 |
2 | ErrorCode: AccessDeniedErrorMessage: You are forbidden to list buckets. | 无listBuckets权限 |
3 | ErrorCode: AccessDeniedErrorMessage: You do not have write acl permission on this object | 无setObjectAcl权限 |
4 | ErrorCode: AccessDeniedErrorMessage: You do not have read acl permission on this object. | 无getObjectAcl权限 |
5 | ErrorCode: AccessDeniedErrorMessage: The bucket you visit is not belong to you. | 子用户没有Bucket管理的权限(如getBucketAcl CreateBucket、deleteBucket setBucketReferer、 getBucketReferer等) |
6 | ErrorCode: AccessDeniedErrorMessage: You have no right to access this object because of bucket acl. | 子用户/临时用户没有访问Object的权限(如putObject getObject、appendObject deleteObject、postObject)等 |
7 | ErrorCode: AccessDeniedErrorMessage: Access denied by authorizer’s policy. | 临时用户访问无权限,该临时用户角色扮演指定授权策略,该授权策略无权限 |
8 | ErrorCode: AccessDeniedErrorMessage: You have no right to access this object. | 子用户/临时用户无当前操作权限(如initiateMultipartUpload等) |
提示:
- 权限策略的生成推荐使用OSS授权策略生成工具 RAM Policy Editor。
- 如果想更多了解阿里云访问控制(RAM),请参见 阿里云访问控制初探 。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。