May Meow logo

May Meow

Subscribe
Archives
August 19, 2020

Quick Note on Minio Users

Hi! I want to show you how you can add new user on your minio server and how you can assign him access rights to selected folders by creating policy.

Create user

mc admin user add mystorage <NEW-USER-ACCESS-KEY> <NEW-USER-SECRET-KEY>

New users dont have any access on server, You can just login so you will need to setup policy and assign it to newly created user

Create Bucket

mc mb mystorage/my-site

Create policy.

Add this policy content to policy-name.json.

{
    "Version": "2012-10-17",
    "Statement": [
      {
        "Action": [
          "s3:GetObject",
          "s3:PutObject",
          "s3:DeleteObject",
          "s3:GetBucketLocation",
          "s3:ListBucket",
          "s3:ListAllMyBuckets"
        ],
        "Effect": "Allow",
        "Resource": [
          "arn:aws:s3:::my-site/*"
        ],
        "Sid": "Public"
      }
    ]
  }

Install policy to server

mc admin policy add mystorage policy-name policy-name.json

Assign policy to user

mc admin policy set mystorage "policy-name" user=<NEW-USER-ACCESS-KEY>

That’s all!

💜 Thank You!

URLs

  • My omg.lol page
  • What am I doing now?
  • You can also check my status page or micro.blog if you want know what I'm doing

Projects

  • I hosing my projects on GitHub
  • I'm currently working on Api Client for the omg lol service.
Don't miss what's next. Subscribe to May Meow:
About Bluesky
This email brought to you by Buttondown, the easiest way to start and grow your newsletter.