Enabling public access for bucket operations
By default, buckets are created with restricted access. You can use the management console to enable public access:
Management console
Nebius AI CLI
- In the management console
, select the appropriate folder. - Select Object Storage.
- Click the name of the bucket you need.
- Click the Settings tab.
- Select the type of access for bucket operations.
- Click Save.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the CLI command to update a bucket:
ncp storage bucket update --help
-
Get a list of buckets in the default folder:
ncp storage bucket list
Result:
+------------------+----------------------+-------------+-----------------------+---------------------+ | NAME | FOLDER ID | MAX SIZE | DEFAULT STORAGE CLASS | CREATED AT | +------------------+----------------------+-------------+-----------------------+---------------------+ | first-bucket | b1gmit33ngp6******** | 53687091200 | STANDARD | 2022-12-16 13:58:18 | +------------------+----------------------+-------------+-----------------------+---------------------+
-
Using the
NAME
column, save the name of the bucket to enable public access to. -
Allow public access to operations with the bucket:
ncp storage bucket update \ --name <bucket_name> \ --public-read \ --public-list \ --public-config-read
Where:
--name
: Name of the bucket to enable public access to.--public-read
: Flag to enable public read access to bucket objects.--public-list
: Flag to enable public access to view the list of bucket objects.--public-config-read
: Flag to enable public read access to the bucket configuration.
The
name
parameter is required. Other parameters are optional. By default, no public access to buckets is allowed.Result:
name: first-bucket folder_id: b1gmit33ngp6******** anonymous_access_flags: read: true list: true config_read: true default_storage_class: STANDARD versioning: VERSIONING_DISABLED max_size: "53687091200" created_at: "2022-12-16T13:58:18.933814Z"