/go/bucket: bucket from the Command Line

/go/bucket manages buckets and access keys on the MinIO server installed by GoAdmio. It can: It connects to MinIO with the root credentials saved by minio, so MinIO must be installed first. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Create a bucket
/go/bucket mybucket

# Make it public
/go/bucket mybucket public

Options

Form What it does
/go/bucket <bucket> Creates the bucket.
/go/bucket <bucket> public Allows anonymous (public) access to the bucket.
/go/bucket <bucket> private Removes anonymous access from the bucket.
/go/bucket <access-key> <secret-key> Creates an S3 access key with the values you give.

Rules

Item Rule
public and private Lowercase only. Public is not recognized.
Access key More than 10 characters.
Secret key More than 20 characters.
Bucket name Use lowercase letters, numbers, hyphens, and dots, 3 to 63 characters long.

If the second argument is not public or private and the key lengths are too short, the command does nothing and prints no error. With no arguments, or more than two, it also does nothing.

Examples

# Create a bucket
/go/bucket backups

# Make the bucket public, then private again
/go/bucket backups public
/go/bucket backups private

# Create an access key (access key > 10 characters, secret key > 20 characters)
/go/bucket AKIAEXAMPLEKEY123 'S3cr3tKeyWithMoreThan20Chars'

Output

The command prints the messages of the MinIO client. Every run starts with the confirmation that the myminio alias was set. The rest depends on the action:

Action Output
Create a bucket A confirmation that the bucket was created.
Public or private A confirmation of the new access policy.
Create an access key The new key pair.
MinIO not installed Please Setup MinIO: and a link to the minio page.

The command exits with status 1 after every action, including on success. Do not use its exit status to detect errors.

Each run also adds a line to /var/log/go/bucket.log (see Security).

See the full reference at /go/bucket and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *