doc: add s3.bucket.access command documentation

Document the new weed shell command for configuring anonymous bucket
access. Add to S3 Bucket Policies page and shell command listing.
Chris Lu committed 2026-03-25 22:19:03 -07:00
1 parent 579472f948
commit 38d756e08f
2 files changed
+30 -2

No files matched your search

+27
@@ -6,6 +6,33 @@ SeaweedFS supports AWS S3-compatible bucket policies for controlling access to b
Bucket policies allow you to grant or deny permissions for S3 operations on a bucket and its objects. They are resource-based policies that complement user-level IAM policies.
## Quick Setup with Weed Shell
The `s3.bucket.access` shell command provides a simple way to configure anonymous access without external tools.
```bash
# View current anonymous access policy
> s3.bucket.access -name my-bucket
# Grant anonymous read and list access (public download)
> s3.bucket.access -name my-bucket -access read,list
# Grant full anonymous access
> s3.bucket.access -name my-bucket -access read,write,list
# Remove all anonymous access (make private)
> s3.bucket.access -name my-bucket -access none
```
Supported permissions: `read` (GetObject), `write` (PutObject, DeleteObject, multipart), `list` (ListBucket).
The command writes a standard bucket policy with `Principal: "*"`. Other (non-anonymous) policy statements are preserved when changing access.
**Note:** Anonymous access also requires an `anonymous` identity in IAM. Create one via the admin UI or:
```bash
> s3.configure -user=anonymous -actions=Read,List -apply
```
## AWS CLI Setup
First, configure the AWS CLI to connect to your SeaweedFS S3 endpoint:
+3 -2
@@ -52,8 +52,9 @@ Type: "help <command>" for help on <command>. Most commands support "<command> -
remote.mount.buckets # mount all buckets in remote storage and pull its metadata
remote.uncache # keep the metadata but remote cache the file content for mounted directories or files
remote.unmount # unmount remote storage
s3.bucket.create # create a bucket with a given name
s3.bucket.delete # delete a bucket by a given name
s3.bucket.access # view or change the anonymous access policy of an S3 bucket
s3.bucket.create # create a bucket with a given name
s3.bucket.delete # delete a bucket by a given name
s3.bucket.list # list all buckets
s3.bucket.lock # view or enable Object Lock for an S3 bucket
s3.bucket.owner # view or change the owner of an S3 bucket