# Using 4EVERLAND with s3fs

By [4EVERLAND](https://paragraph.com/@4everland-3) · 2023-04-14

---

In this tutorial you learn how to use [s3fs](https://github.com/s3fs-fuse/s3fs-fuse) as a client for [4EVERLAND](https://www.4everland.org/). `s3fs` is a FUSE-backed file interface for S3, allowing you to mount your S3 buckets on your local Linux or macOS operating system. `s3fs` preserves the native object format for files, so they can be used with other tools, including AWS CLI.

**Security & Identity:**

You may need certain permissions to carry out some actions described on this page. This means:

*   You are the Owner of the [4EVERLAND Member System](https://docs.4everland.org/getting-started/account) which the actions will be carried out, or
    
*   You are a Member of the organization, with a policy granting you the necessary permission sets
    

**Important:**

The version of `s3fs` available for installation using the systems package manager does not support files larger than 10GB. It is therefore recommended to compile a version, including the required corrections, from the s3fs source code repository. This tutorial will guide you through that process.

Note that even with the source code compiled version of s3fs, there is a maximum file size of 96GiB and maximum number of 200 when using s3fs with 4EVERLAND Bucket.

**Requirements:**

*   You have an account and are logged into the [4EVERLAND Dashboard](https://dashboard.4everland.org/login)
    
*   You have generated [your API key](https://docs.4everland.org/storage/bucket/s3-compatible-api)
    

**Installing s3fs**
-------------------

### Dependencies

Start by installing the dependencies of `s3fs-fuse` by executing the following commands, depending on your operating system:

On **Debian and Ubuntu**, from the command line:

    apt update && apt upgrade -y
    apt -y install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config
    

On **RedHat and CentOS**, from the command line:

    yum update
    yum install automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel
    

On **macOS**, via [Homebrew](https://brew.sh/):

    brew install --cask osxfuse
    brew install autoconf automake pkg-config gnutls libgcrypt nettle git
    

**Note:**

On macOS you need to add permissions to FUSE. Go to the `Settings > Security & Privacy > General` tab to allow the extension.

### s3fs-fuse

Next, download and install `s3fs-fuse` itself:

Download the Git repository of `s3fs-fuse`:

    git clone https://github.com/s3fs-fuse/s3fs-fuse.git
    

Enter the s3fs-fuse directory

    cd s3fs-fuse
    

*   Update the `MAX_MULTIPART_CNT` value in the `fdcache_entity.cpp` file:
    
*   On **Linux**:
    

    sed -i 's/MAX_MULTIPART_CNT         = 10 /MAX_MULTIPART_CNT         = 1 /' src/fdcache_entity.cpp
    

    sed -i '' -e 's/MAX_MULTIPART_CNT         = 10 /MAX_MULTIPART_CNT         = 1 /' src/fdcache_entity.cpp
    

Run the `autogen.sh` script to generate a configuration file, configure the application and compile it from the master branch:

    ./autogen.sh
    ./configure
    make
    

Run the installation of the application using the `make install` command:

    make install
    

Copy the application to its final destination to complete the installation:

    cp ~/s3fs-fuse/src/s3fs /usr/local/bin/s3fs
    

**Configuring s3fs** **& 4EVERLAND**
------------------------------------

**Set up Access Keys**

If you already have AWS CLI installed and configured for use with 4EVERLAND, you can use the credentials file used by AWS CLI. This file is stored at `${HOME}/.aws/credentials`.

Otherwise, you can set up a credentials file for S3FS at `${HOME}/.passwd-s3fs`.You will need to save your 4EVERLAND Bucket API Key and API Secret to this file and give it owner permissions. You can do so with the following commands:

    echo ACCESS_KEY:SECRET_KEY > ${HOME}/.passwd-s3fs 
    chmod 600 ${HOME}/.passwd-s3fs
    

Replace the **ACCESS\_KEY** and **SECRET\_KEY** with your 4EVERLAND API Key and API Secret, which you can find in Dashboard>Bucket>Access Keys.

**Mount your bucket**

Suppose you have created a Bucket named 'mybucket' in 4EVERLAND and you want the contents of the path '`/home/4everland/mount`' to be automatically synced to 'mybucket':

    s3fs mybucket /home/4everland/mount -o passwd_file=${HOME}/.passwd-s3fs -o url=https://endpoint.4everland.co
    

**mybucket:** Name of your 4EVERLAND Bucket

`/home/4everland/mount`: The path where you want the bucket mounted.

**Confirm the bucket has been mounted**

Run the following command and check that the contents of the '`/home/4everland/mount`' path match the contents of 'mybucket'.

    ls /home/4everland/mount
    

Once you have completed these steps, the files you have uploaded to the `/home/4everland/mount` path will be automatically synced to your bucket. The file system of the mounted bucket will appear in your OS like a local file system. This means you can access the files as if they were on your hard drive.

About 4EVERLAND
===============

4EVERLAND is a Web 3.0 infrastructure that integrates storage, computing, and network core capabilities. It aims to help the user make a smooth leap from Web 2.0 to Web 3.0 and become the infrastructure for millions of Web 3.0 developers and applications.

[Website](https://www.4everland.org/) | [Twitter](https://twitter.com/4everland_org) | [Telegram](https://t.me/org_4everland) | [Discord](https://discord.com/invite/Cun2VpsdjF) | [Reddit](https://www.reddit.com/r/4everland/) | [Medium](https://4everland.medium.com/) | Email

---

*Originally published on [4EVERLAND](https://paragraph.com/@4everland-3/using-4everland-with-s3fs)*
