## Alias to Minio Server
mc alias set myminio http://localhost:9000 <access-key> <secret-key>
## List Directories (Root Buckets + Directories)
mc ls myminio
mc ls myminio bucket/folder
## List Policies
mc admin policy list myminio
## Add Policy
mc admin policy add myminio app-all /path/to/policy.json
## List Users
mc admin user list myminio
## Add User
mc admin user add myminio newuser newuser123
## Assign User to Policy
mc admin policy set myminio app-all user=newuser
## Disable User
mc admin user disable myminio newuser
## Remove User
mc user remove myminio newuser
## Set Bucket Lifecycle
mc ilm import myminio/bucket-name < ./path/to/lifecycle.json
## List Bucket Lifecycles
mc ilm ls myminio/bucket-name
## Get Policy of Bucket / Folder
mc policy get myminio/bucket-name/folder
## Set Policy for Bucket / Folder
mc policy set <none/download/upload/public> myminio/bucket-name/folder
Last active
October 21, 2021 10:04
-
-
Save a-h-abid/fed87dc7a47adf4c3686238ece9a45e5 to your computer and use it in GitHub Desktop.
MinIO MC Commands Quick Sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Rules": [ | |
{ | |
"Expiration": { | |
"Days": 1 | |
}, | |
"ID": "PublicTempUploads", | |
"Filter": { | |
"Prefix": "path/" | |
}, | |
"Status": "Enabled" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:GetBucketPolicy", | |
"s3:ListAllMyBuckets", | |
"s3:ListBucket" | |
], | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::example-bucket" | |
], | |
"Sid": "" | |
}, | |
{ | |
"Action": [ | |
"s3:AbortMultipartUpload", | |
"s3:DeleteObject", | |
"s3:GetObject", | |
"s3:ListMultipartUploadParts", | |
"s3:PutObject" | |
], | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::example-bucket/*" | |
], | |
"Sid": "" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment