Deep dive into using s3cmd to access object storage

Object storage can be used to store your files in containers. In this article, you will create a basic object storage container and perform common object storage operations with s3cmd.

What we are going to cover

  • Creating a new object storage container

  • Uploading files

  • Listing files and folder-like prefixes

  • Deleting files from a container

  • Removing storage containers

  • Enabling or disabling public access to object storage containers

  • Testing public access from the command line

Prerequisites

Before starting, make sure that:

  1. You have an admin hosting account with access to the EUMETSAT cloud interface:

    my.cloud.eumetsat.int

  2. You can sign in to the portal and open the service catalog. For more information, see Services available

  3. You have S3 API keys for Object Storage.

    To create and manage S3 keys, see:

    Create a new pair of S3 keys

  4. You have access to a virtual machine or local terminal.

    You can create a Linux virtual machine by following one of these articles:

  5. s3cmd is installed and configured for the Object Storage endpoint of the region where you want to work.

    For configuration instructions, see:

  6. To test public object download from the terminal, you can use wget which comes preinstalled on most modern operating systems.

    The article uses wget only in the section about public object storage containers.

  7. You have a test file available in your working directory, for example file.txt.

    The upload examples in this article use file.txt, file2.txt, and folder-to-upload as sample local files and directories.

  8. You have permission to create, modify, and delete object storage containers.

  9. The bucket names used in this article are examples.

    Replace names such as example-bucket, example-default-placement-bucket, and example-cold-placement-bucket with unique bucket names in your own environment.

Creating a new object storage container

To create a new storage container, you need an S3 client. In this example, you will use s3cmd.

To create a new S3 bucket, use the following command:

s3cmd mb s3://example-bucket

The result is:

Bucket 's3://example-bucket/' created

While creating the bucket, you can use the –region argument to specify where it should be stored. Currently, there are two available placements:

default-placement:

Default storage space with replicated storage backend.

cold-placement:

Slower, more space-efficient erasure-coded storage backend.

The colon before the placement name is required.

To create a bucket in the default placement, use:

s3cmd mb s3://example-default-placement-bucket --region=':default-placement'

The result is:

Bucket 's3://example-default-placement-bucket/' created

For cold placement, use:

s3cmd mb s3://example-cold-placement-bucket --region=':cold-placement'

The result is:

Bucket 's3://example-cold-placement-bucket/' created

Warning

Bucket names must be unique.

Bucket names cannot be formatted as IP addresses.

Bucket names can be between 3 and 63 characters long.

Bucket names must not contain uppercase characters or underscores.

Bucket names must start with a lowercase letter or number.

Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.

Bucket names cannot contain forward slashes (/).

In this cloud environment, single tenancy is enabled. This means that two object storage containers cannot have the same name. Avoid common names such as storage or files.

Uploading a file

To upload a file to a storage bucket, use s3cmd put:

s3cmd put file.txt s3://example-bucket/

The result is:

upload: 'file.txt' -> 's3://example-bucket/file.txt'  [1 of 1]
 0 of 0     0% in    0s     0.00 B/s  done

To verify that the file was uploaded, list the contents of the bucket:

s3cmd ls s3://example-bucket/

The result is:

2026-04-24 14:51            0  s3://example-bucket/file.txt

This uploads the file to the root of the bucket.

Uploading a file into a prefix

Object Storage does not use real folders. Folder-like paths are prefixes in object names.

To upload a file into a specific prefix, include the prefix in the object path:

s3cmd put file.txt s3://example-bucket/directory1/directory1/

The result is:

upload: 'file.txt' -> 's3://example-bucket/directory1/directory1/file.txt'  [1 of 1]
 0 of 0     0% in    0s     0.00 B/s  done

List the root of the bucket:

s3cmd ls s3://example-bucket/

The result is:

                          DIR  s3://example-bucket/directory1/
2026-04-24 14:51            0  s3://example-bucket/file.txt

List the contents of the prefix:

s3cmd ls s3://example-bucket/directory1/directory1/

The result is:

2026-04-24 14:53            0  s3://example-bucket/directory1/directory1/file.txt

Uploading multiple files

You can upload multiple files at once:

s3cmd put file.txt file2.txt s3://example-bucket/multiple-file-upload/

The result is:

upload: 'file.txt' -> 's3://example-bucket/multiple-file-upload/file.txt'  [1 of 2]
 0 of 0     0% in    0s     0.00 B/s  done
upload: 'file2.txt' -> 's3://example-bucket/multiple-file-upload/file2.txt'  [2 of 2]
 0 of 0     0% in    0s     0.00 B/s  done

To verify the upload, use:

s3cmd ls s3://example-bucket/multiple-file-upload/

The result is:

2026-04-24 14:54            0  s3://example-bucket/multiple-file-upload/file.txt
2026-04-24 14:54            0  s3://example-bucket/multiple-file-upload/file2.txt

Uploading a directory recursively

To upload an entire directory recursively, use –recursive:

s3cmd put --recursive folder-to-upload s3://example-bucket/

The result is:

upload: 'folder-to-upload/file.txt' -> 's3://example-bucket/folder-to-upload/file.txt'  [1 of 2]
 0 of 0     0% in    0s     0.00 B/s  done
upload: 'folder-to-upload/file2.txt' -> 's3://example-bucket/folder-to-upload/file2.txt'  [2 of 2]
 0 of 0     0% in    0s     0.00 B/s  done

To verify the upload, use:

s3cmd ls s3://example-bucket/folder-to-upload/

The result is:

2026-04-24 14:56            0  s3://example-bucket/folder-to-upload/file.txt
2026-04-24 14:56            0  s3://example-bucket/folder-to-upload/file2.txt

Deleting files from a container

To delete a single file from a bucket, use:

s3cmd del s3://example-bucket/file.txt

The result is:

delete: 's3://example-bucket/file.txt'

To delete multiple files, specify them one by one:

s3cmd del s3://example-bucket/multiple-file-upload/file.txt s3://example-bucket/multiple-file-upload/file2.txt

The result is:

delete: 's3://example-bucket/multiple-file-upload/file.txt'
delete: 's3://example-bucket/multiple-file-upload/file2.txt'

Deleting folders (prefixes)

As Object Storage does not support real folders, folder-like paths are prefixes in object names.

To delete a prefix and all objects under it, use –recursive:

s3cmd del --recursive s3://example-bucket/folder-to-upload/

The result is:

delete: 's3://example-bucket/folder-to-upload/file.txt'
delete: 's3://example-bucket/folder-to-upload/file2.txt'

This removes all objects that start with the specified prefix.

Important notes

  • Deletions are permanent and cannot be undone.

  • Make sure you are targeting the correct bucket and prefix before using –recursive.

Removing storage containers

To remove an empty container, use s3cmd rb:

s3cmd rb s3://example-cold-placement-bucket

The result is:

Bucket 's3://example-cold-placement-bucket/' removed

The bucket must be empty before it can be removed.

If you try to remove a bucket that still contains objects, the command fails:

s3cmd rb s3://example-bucket

The result is:

ERROR: S3 error: 409 (BucketNotEmpty)

If the bucket contains data, you can remove the bucket together with all objects by using –recursive:

s3cmd rb --recursive s3://example-bucket

The result is:

WARNING: Bucket is not empty. Removing all the objects from it first. This may take some time...
delete: 's3://example-bucket/directory1/directory1/file.txt'
Bucket 's3://example-bucket/' removed

Use this option with caution, as it permanently deletes all data stored in the bucket.

Working with public object storage containers

Enabling or disabling public access to object storage containers

By default, object storage containers are private.

If you want to change access permissions after the container has been created, you can modify its ACL (Access Control List) using s3cmd.

To make a single object public, use:

s3cmd setacl s3://example-bucket/folder-to-upload/file2.txt --acl-public

To make all objects under a prefix public, use –recursive:

s3cmd setacl --recursive s3://example-bucket/folder-to-upload/ --acl-public

The result is:

s3://example-bucket/folder-to-upload/file.txt: ACL set to Public  [1 of 2]
s3://example-bucket/folder-to-upload/file2.txt: ACL set to Public  [2 of 2]

You can also change the ACL of the bucket itself:

s3cmd setacl s3://example-bucket --acl-public

Use this option carefully. In most cases, it is safer to make only the required object or prefix public.

Object Storage endpoint depends on the region where the bucket was created. Use the endpoint that belongs to your region when creating public object URLs.

https://s3.r1.cloud.eumetsat.int

Testing public access from the command line

After you make an object public, you do not need to open it in a browser. You can verify access directly from the command line.

First, list the objects in the bucket with s3cmd:

s3cmd ls s3://example-bucket/

The result should show the objects stored in the bucket, for example:

2026-04-24 14:51            0  s3://example-bucket/file.txt
                          DIR  s3://example-bucket/folder-to-upload/

To list objects inside a folder-like prefix, add the prefix to the path:

s3cmd ls s3://example-bucket/folder-to-upload/

The result should show the objects under that prefix:

2026-04-24 14:56            0  s3://example-bucket/folder-to-upload/file.txt
2026-04-24 14:56            0  s3://example-bucket/folder-to-upload/file2.txt

The public URL of an object consists of the Object Storage endpoint, the bucket name, and the full object path.

For example, this object:

s3://example-bucket/folder-to-upload/file2.txt

can be accessed through the following public URL in the FRA1-3 region:

https://s3.fra1-3.cloudferro.com/example-bucket/folder-to-upload/file2.txt

Use the endpoint that belongs to the region where your bucket was created.

wget https://s3.r1.cloud.eumetsat.int/example-bucket/folder-to-upload/file2.txt

Example output:

--2026-04-24 17:47:44--  https://s3.fra1-3.cloudferro.com/example-bucket/folder-to-upload/file2.txt
Resolving s3.fra1-3.cloudferro.com (s3.fra1-3.cloudferro.com)... 74.63.12.97, 2a01:9aa0:45:1::100
Connecting to s3.fra1-3.cloudferro.com (s3.fra1-3.cloudferro.com)|74.63.12.97|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [inode/x-empty]
Saving to: 'file2.txt'

file2.txt                 [ <=>                           ]       0  --.-KB/s    in 0s

2026-04-24 17:47:44 (0.00 B/s) - 'file2.txt' saved [0/0]

You can also save the downloaded object under a different local file name:

wget -O downloaded-file2.txt https://s3.fra1-3.cloudferro.com/example-bucket/folder-to-upload/file2.txt

If the object is not public, the download will fail with an access error, for example:

ERROR 403: Forbidden.

In that case, check whether you made the correct object or prefix public:

s3cmd info s3://example-bucket/folder-to-upload/file2.txt

To make the object public, use:

s3cmd setacl s3://example-bucket/folder-to-upload/file2.txt --acl-public

To make all objects under a prefix public, use:

s3cmd setacl --recursive s3://example-bucket/folder-to-upload/ --acl-public

To remove public access from one object again, use:

s3cmd setacl s3://example-bucket/folder-to-upload/file2.txt --acl-private

To remove public access from all objects under a prefix, use:

s3cmd setacl --recursive s3://example-bucket/folder-to-upload/ --acl-private

If you changed the ACL of the bucket itself, make the bucket private again with:

s3cmd setacl s3://example-bucket --acl-private

Note

Object Storage does not use real folders. Folder-like paths are prefixes in object names.

You can download individual objects, but you cannot download a folder by adding a folder path to the public URL.

Warning

Public access should be enabled only for objects that are intended to be shared.

If you make a whole bucket or prefix public, other users may be able to access all public objects under that bucket or prefix if they know or can construct the object URLs.

What To Do Next

Now that you have created your object storage container, you can mount it on the platform of your choice for easier access. There are many ways to do that, for instance: