Skip to main content
s3fs

s3fs

s3fs is an open source utility for Linux and macOS. With s3fs, you can mount a container to a folder on your device and work with it as a regular folder while it is mounted.

Configure s3fs

  1. Install the client.
  2. Configure access.
  3. Mount the container.

1. Install the client

Use the Installation instructions in the s3fs-fuse GitHub.

2. Configure access

Access can be configured by a user with the Account Owner or User Administrator role.

  1. Create a service user с role with access to the object store.If you are using a user with the Object Storage User role, the container must have a configured access policy.

  2. Issue an S3 key to the user.

  3. Open the CLI.

  4. In the ~/.passwd-s3fs file, save the S3 key:

    echo <access_key>:<secret_key> > ~/.passwd-s3fs

    Specify:

    • <access_key> — field value Access key from S3 key;
    • <secret_key> — field value Secret key from the S3 key.
  5. Restrict access to the ~/.passwd-s3fs file:

    chmod 600 ~/.passwd-s3fs

3. Mount the container

The container will be mounted in a folder on your device. Each time the system reboots, the container will be unmounted.

You can:

  • perform a one-time mount of the container after each manual reboot of the system;
  • configure an automatic mount to be performed automatically each time the system boots.
  1. Open the CLI.

  2. Create an empty folder:

    mkdir ~/<local_folder>

    Specify <local_folder> — folder name.

  3. Mount the container:

    s3fs <container_name> <path> -o passwd_file=~/.passwd-s3fs -o allow_other -o use_path_request_style -o endpoint=<pool> -o url=https://<s3_domain>

    Specify:

    • <container_name> — container name;
    • <path> — path to the local folder where the container will be mounted;
    • -o allow_other — optional: a parameter that allows other users on the device to access the container folder. If you do not specify the parameter, only the current user can access the folder;
    • -o use_path_request_style — optional: parameter that enables Path-style addressing. If you do not specify the parameter, Virtual-Hosted addressing will be used Virtual-Hosted addressing;
    • <pool> — pool in which the object storage is located;
    • <s3_domain> — S3 API domain depends on pool in which the object storage is located.