All Products
Search
Document Center

Object Storage Service:Mount OSS buckets to local file systems in various operating systems by using s3fs, goofys, and Rclone

Last Updated:Mar 20, 2026

s3fs, goofys, and Rclone are S3-compatible FUSE tools that let you mount an Object Storage Service (OSS) bucket as a local directory. Once mounted, your existing file-system-based applications and workflows can read and write OSS objects without any code changes.

Choose a tool

ToolOS supportPOSIX supportRandom writeLocal cacheBest for
s3fsLinux, macOSMost featuresYesYes (disk-based)General-purpose workloads, symbolic links, append operations
goofysLinux, macOSPartialNoNoRead-heavy workloads, cp and mv performance
RcloneWindows (for mounting)PartialNoConfigurableWindows environments, multi-cloud workflows

Prerequisites

Before you begin, ensure that you have:

  • A Resource Access Management (RAM) user with an AccessKey pair. See Create a RAM user

  • Permissions granted to the RAM user. Options:

    • AliyunOSSFullAccess — full OSS management

    • AliyunOSSReadOnlyAccess — read-only OSS access

    • Custom policy for fine-grained control. See Common examples of RAM policies

s3fs

s3fs mounts an OSS bucket to a local directory on Linux or macOS. It supports most POSIX file system features, making it suitable for general-purpose workloads.

For more information, see the s3fs GitHub wiki and FAQ.

Key features

  • Most POSIX file system operations: upload, download, directory management, symbolic links, and user permissions

  • Random write and append to existing objects

  • Multipart upload for large objects

  • Disk-based local cache for read and write operations

Limitations

  • No hard links

  • Upload and download require the object to be locally cached first — speed depends on disk read/write performance

  • Local cache size grows indefinitely — clear the cache periodically

Mount an OSS bucket with s3fs

Step 1: Install s3fs

The following commands install s3fs on Ubuntu, CentOS, and macOS. For other operating systems, see Installation.

  • Ubuntu

      sudo apt install s3fs
  • CentOS

      sudo yum install epel-release
      sudo yum install s3fs-fuse
  • macOS

      brew install --cask macfuse
      brew install gromgit/fuse/s3fs-mac

Step 2: Store your AccessKey pair

Write your AccessKey ID and AccessKey secret to ~/.passwd-s3fs, then restrict access to the file:

echo <AccessKey-ID>:<AccessKey-secret> > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs

Replace <AccessKey-ID> and <AccessKey-secret> with the credentials for your RAM user.

Step 3: Mount the bucket

Create a local mount target and mount the bucket:

mkdir /tmp/oss-bucket

s3fs examplebucket /tmp/oss-bucket \
  -o passwd_file=$HOME/.passwd-s3fs \
  -ourl=http://oss-cn-hangzhou.aliyuncs.com

Replace the following:

PlaceholderDescriptionExample
examplebucketYour bucket namemy-data-bucket
/tmp/oss-bucketLocal mount target path/mnt/oss
oss-cn-hangzhou.aliyuncs.comPublic endpoint for your bucket's region. See Regions and endpointsoss-ap-southeast-1.aliyuncs.com
Note: If your Elastic Compute Service (ECS) instance is in the same region as the bucket, use the internal endpoint (for example, oss-cn-hangzhou-internal.aliyuncs.com) to avoid public network traffic.

For a full list of s3fs options, see Fuse Over Amazon.

goofys

goofys mounts an OSS bucket to a local directory on Linux or macOS. It trades POSIX completeness for performance — no local cache means faster cp and mv operations, but no random write support.

For more information and benchmarks, see the goofys GitHub page.

Key features

  • No local cache dependency — better throughput for copy and move operations

  • Sequential write support

  • Suitable for read-heavy workloads

Limitations

  • Sequential write only — no random write support

  • Object permissions and attributes are not saved

  • No symbolic links or hard links

  • ctime, atime, and mtime are identical

  • Object metadata operations are not supported — avoid workloads that depend on metadata

Mount an OSS bucket with goofys

Step 1: Install goofys

  • Linux

      curl -SL "https://github.com/kahing/goofys/releases/latest/download/goofys" -o $HOME/goofys
      chmod u+x $HOME/goofys
  • macOS

      brew cask install osxfuse
      brew install goofys

    For other operating systems, see Installation.

Step 2: Configure credentials

Create ~/.aws/credentials with your AccessKey pair:

mkdir ~/.aws

Open ~/.aws/credentials and add the following:

[default]
aws_access_key_id = <AccessKey-ID>
aws_secret_access_key = <AccessKey-secret>

Replace <AccessKey-ID> and <AccessKey-secret> with the credentials for your RAM user.

Step 3: Mount the bucket

Create a local mount target and mount the bucket:

mkdir /mnt/oss-bucket

$HOME/goofys --endpoint http://oss-cn-hangzhou.aliyuncs.com --subdomain examplebucket /mnt/oss-bucket

Replace the following:

PlaceholderDescriptionExample
examplebucketYour bucket namemy-data-bucket
/mnt/oss-bucketLocal mount target path/mnt/oss
oss-cn-hangzhou.aliyuncs.comPublic endpoint for your bucket's regionoss-ap-southeast-1.aliyuncs.com

The --subdomain flag is required to enable virtual-hosted-style domain names for OSS.

Note: If your ECS instance is in the same region as the bucket, use the internal endpoint (for example, oss-cn-hangzhou-internal.aliyuncs.com) to avoid public network traffic.

Rclone

Rclone is a command-line program for managing data across 50+ cloud storage services. On Windows, it can mount an OSS bucket as a local drive, letting you work with OSS objects as if they were files on a local disk.

For more information, see rclone.org.

Key features

  • File synchronization, transfer, encryption, and bucket mounting

  • Supports multiple protocols and storage providers

  • Configurable VFS cache for write operations

Mount an OSS bucket with Rclone on Windows

Step 1: Install WinFsp

Download and install WinFsp from WinFsp 2023t. This example uses winfsp-1.12.22339.

Step 2: Install Rclone

Download the Rclone Windows build from rclone.org/downloads. This example uses rclone-v1.60.1-windows-amd64. Rclone requires no installer — extract the archive to a local directory, such as D:\Rclone.

Step 3: Configure Rclone

Add D:\Rclone to your system environment variables, then verify the installation:

rclone --version

If rclone 1.60.1 is returned, Rclone is installed.

Run rclone config and follow the prompts:

  1. Enter n to create a new remote. Name it oss-disk.

  2. Select the option containing Amazon S3 Compliant Storage or enter 5.

  3. Select the option containing Alibaba Cloud Object Storage System (OSS) or enter 2.

  4. At env_auth>, press Enter.

  5. At access_key_id>, enter your AccessKey ID.

  6. At secret_access_key>, enter your AccessKey secret.

  7. At endpoint>, enter your OSS endpoint (for example, oss-cn-hangzhou.aliyuncs.com). If your ECS instance runs Windows and is in the same region as the bucket, use the internal endpoint (for example, oss-cn-hangzhou-internal.aliyuncs.com) to avoid public network traffic.

  8. At acl>, enter 1 to set the ACL to default (private).

  9. At storage_class>, enter 1 to inherit the storage class from the bucket.

  10. At Edit advanced config?(y/n), enter n.

  11. Enter q to save and exit.

Step 4: Mount the bucket

Mount the bucket examplebucket to drive E:, using D:\disk-cache as the cache directory:

rclone mount oss-disk:/examplebucket E: --cache-dir D:\disk-cache --vfs-cache-mode writes

When The service rclone has been started is displayed, the bucket is mounted and appears as examplebucket(E:) in File Explorer.

What's next