Skip to content


s3fs allows Linux, macOS, and FreeBSD to mount an S3 bucket via FUSE. s3fs preserves the native object format for files, allowing use of other tools like AWS CLI.

Installing s3fs-fuse

Example for Debian/Ubuntu :

$ sudo apt install s3fs

Create S3 Credentials

You first need to enable the credentials for the S3 proptocol.

Run the following command to create a pair of access and secret keys after your sourced your OpenStack credentials.

$ source ~/ 
$ openstack ec2 credentials create
| Field      | Value                                                                                                                                                |
| access     | 1161b3e891f24xxxxxxxxxxxxxxxxxxx                                                                                                                     |
| links      | {'self': ''} |
| project_id | d1440aa24a65411fb9bac2b842c8defa                                                                                                                     |
| secret     | 2e39f75488954xxxxxxxxxxxxxxxxxxx                                                                                                                     |
| trust_id   | None                                                                                                                                                 |
| user_id    | 153855c4fa1b4415bdd7681221259f72                                                                                                                     |

Store your S3 credentials in a file ${HOME}/.passwd-s3fs and set owner-only permissions:

chmod 600 ${HOME}/.passwd-s3fs

Create a bucket in the infomaniak S3 storage

We create it using the OpenStack Swift client :

$ sudo apt install python3-swiftclient

Let's call the bucket bucket1

$ swift post bucket1

Create a mount point

mkdir ~/bucket1

Mount the bucket locally

Teh bucket bucket1 will be mounted in the directory ~/bucket1

s3fs bucket1 ~/bucket1 -o passwd_file=~/.passwd-s3fs  -o url=  -o use_path_request_style  -o umask=0002

And voilĂ .

Back to top