Skip to content

Can you list objects in a S3 bucket without credentials?


export MINIO_ALIAS=myminio

mc alias set $MINIO_ALIAS http://localhost:9000 minioadmin minioadmin


mc anonymous set public $MINIO_ALIAS /testbucket


curl -X GET "http://localhost:9000/testbucket?list-type=2"

curl -X GET "http://http://localhost:9000/testbucket"
``

mc alias set myminio http://localhost:9000 minioadmin minioadmin

mc admin policy create myminio publicpermission /permissions/public.json


mc admin policy list myminio

mc admin policy info myminio publicpermission

export MINIO_ALIAS=myminio

mc alias set $MINIO_ALIAS http://localhost:9000 minioadmin minioadmin

export MINIO_POLICY_NAME=publicpermission
export MINIO_USER=miniouser

# Attach a policy to a user
mc admin policy attach \
    $MINIO_ALIAS \
    $MINIO_POLICY_NAME \
    --user $MINIO_USER

# Detach a policy to a user
mc admin policy detach \
    $MINIO_ALIAS \
    $MINIO_POLICY_NAME \
    --user $MINIO_USER

Can you upload to a public S3 bucket?

echo "Paul was here" > "your-file.txt"


curl -X PUT -T "your-file.txt" \
     http://localhost:9000/testbucket/your-file.txt


YES YOU CAN