GoAdmio Command Line: s3 with /go/s3

/go/s3 makes an object-storage bucket look like an ordinary folder, /s3, on the server. Files you copy into /s3 are uploaded to the bucket, and files in the bucket appear in /s3. It uses s3fs, a FUSE file system. The command: When /s3 exists, create also makes a matching folder for each new account. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Mount a bucket from your own MinIO or other S3-compatible service
/go/s3 -b mybucket -k ACCESSKEY -s SECRETKEY -e s3.example.com

Options

Option Required Notes
-b <bucket> Yes The bucket name.
-k <access key> Yes The access key ID.
-s <secret key> Yes The secret access key.
-e <endpoint> Yes The host name of the service, without https://. A port is allowed, for example s3.example.com:9000. The connection always uses HTTPS.

The key and secret are only saved when you give both. When you leave them out, the existing /etc/passwd-s3fs is used. The /etc/fstab entry is only written when you give -b and an endpoint that contains a dot.

Examples

# Mount a bucket
/go/s3 -b mybucket -k ACCESSKEY -s SECRETKEY -e s3.example.com

# Check that it is mounted and readable
df -h /s3
mount | grep s3fs
ls /s3

# Mount it again from /etc/fstab, for example after a failed attempt
mount /s3

# Unmount it and stop it from mounting at boot
umount /s3
sed -i "/s3 fuse.s3fs/d" /etc/fstab

If you set up the bucket with GoAdmio’s own object storage, create the bucket and an access key first with bucket, and secure the endpoint with miniossl.

Output

Outcome What you get
No options Usage: s3 [-b] Bucket Name [-k] Access Key ID [-s] Secret Access Key [-e] End Point and exit status 1.
An unknown option The same usage line, and the command keeps running.
Mounted Nothing.
Mount failed The error message from s3fs, if it prints one. The command doesn’t check for it.

Notes on the output:

  • There is no success message. Check the mount yourself (see Examples).
  • The exit status does not tell you whether the mount worked.
  • Every run is logged with a timestamp and all its arguments, including the secret key, to /var/log/go/s3.log.

See the full reference at /go/s3 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 *