我的场景
1.是让指定的用户可以通过阿里云的 OSS Browser 浏览器工具进行上传到指定的目录
2.用户只能文件上传操作,不能进行删除
**
阿里云提供的快速生成代码工具
http://gosspublic.alicdn.com/ram-policy-editor/index.html?spm=a2c4g.11186623.2.5.3a7d124bSHbfj2
**
配置代码
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"oss:ListBuckets",
"oss:GetBucketStat",
"oss:GetBucketInfo",
"oss:GetBucketTagging",
"oss:GetBucketLifecycle",
"oss:GetBucketWorm",
"oss:GetBucketVersioning",
"oss:GetBucketAcl",
"oss:ListCname"
],
"Resource": "acs:oss:*:*:*"
},
{
"Effect": "Allow",
"Action": [
"oss:GetObject",
"oss:GetObjectAcl",
"oss:*"
],
"Resource": [
"acs:oss:*:*:yun-live/yun_live_file/*"
]
},
{
"Effect": "Allow",
"Action": [
"oss:ListObjects",
"oss:Put",
"oss:*"
],
"Resource": [
"acs:oss:*:*:yun-live"
],
"Condition": {
"StringLike": {
"oss:Delimiter": "/",
"oss:Prefix": [
"",
"yun_live_file/",
"yun_live_file/*"
]
}
}
},
{
"Effect": "Deny",
"Action": [
"oss:DeleteBucket"
],
"Resource": [
"acs:oss:*:*:*"
]
},
{
"Effect": "Deny",
"Action": [
"oss:DeleteObject"
],
"Resource": [
"acs:oss:*:*:*"
]
}
]
}
操作流程
工具下载地址
https://help.aliyun.com/document_detail/209974.html?spm=a2c4g.11186623.6.903.3fcc7385TNiLUM