下载mc工具
MinIO Client
https://docs.min.io/docs/minio-client-quickstart-guide.html
brew install minio/stable/mc
mc --help
权限Json
只读
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject" ], "Resource": [ "arn:aws:s3:::*" ] } ] }
只传
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetBucketLocation", "s3:GetObject", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::*" ] } ] }
Makefile脚本
test: echo $(hello) para: make test hello=HHHHHH alias_minio: mc alias set myminio http://n1:25955/ admin haoyiping add_policy: mc admin policy add myminio get_only get_only.json mc admin policy add myminio get_put get_put.json mc admin policy add myminio put_only put_only.json mc admin policy add myminio get_put_delete get_put_delete.json init: make alias_minio make add_policy create_user_get_only: mc admin user add myminio $(uname) $(pwd) mc admin policy set myminio get_only user=$(uname) create_user_get_put: mc admin user add myminio $(uname) $(pwd) mc admin policy set myminio get_put user=$(uname) create_user_put_only: mc admin user add myminio $(uname) $(pwd) mc admin policy set myminio put_only user=$(uname) create_user_get_put_delete: mc admin user add myminio $(uname) $(pwd) mc admin policy set myminio get_put_delete user=$(uname) delete_user: mc admin user delete myminio $(uname) list_user: mc admin user list myminio
网友评论