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
| Tool | OS support | POSIX support | Random write | Local cache | Best for |
|---|---|---|---|---|---|
| s3fs | Linux, macOS | Most features | Yes | Yes (disk-based) | General-purpose workloads, symbolic links, append operations |
| goofys | Linux, macOS | Partial | No | No | Read-heavy workloads, cp and mv performance |
| Rclone | Windows (for mounting) | Partial | No | Configurable | Windows 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 managementAliyunOSSReadOnlyAccess— read-only OSS accessCustom 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 s3fsCentOS
sudo yum install epel-release sudo yum install s3fs-fusemacOS
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-s3fsReplace <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.comReplace the following:
| Placeholder | Description | Example |
|---|---|---|
examplebucket | Your bucket name | my-data-bucket |
/tmp/oss-bucket | Local mount target path | /mnt/oss |
oss-cn-hangzhou.aliyuncs.com | Public endpoint for your bucket's region. See Regions and endpoints | oss-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, andmtimeare identicalObject 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/goofysmacOS
brew cask install osxfuse brew install goofysFor other operating systems, see Installation.
Step 2: Configure credentials
Create ~/.aws/credentials with your AccessKey pair:
mkdir ~/.awsOpen ~/.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-bucketReplace the following:
| Placeholder | Description | Example |
|---|---|---|
examplebucket | Your bucket name | my-data-bucket |
/mnt/oss-bucket | Local mount target path | /mnt/oss |
oss-cn-hangzhou.aliyuncs.com | Public endpoint for your bucket's region | oss-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 --versionIf rclone 1.60.1 is returned, Rclone is installed.
Run rclone config and follow the prompts:
Enter
nto create a new remote. Name itoss-disk.Select the option containing Amazon S3 Compliant Storage or enter
5.Select the option containing Alibaba Cloud Object Storage System (OSS) or enter
2.At
env_auth>, press Enter.At
access_key_id>, enter your AccessKey ID.At
secret_access_key>, enter your AccessKey secret.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.At
acl>, enter1to set the ACL todefault(private).At
storage_class>, enter1to inherit the storage class from the bucket.At
Edit advanced config?(y/n), entern.Enter
qto 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 writesWhen The service rclone has been started is displayed, the bucket is mounted and appears as examplebucket(E:) in File Explorer.
What's next
Regions and endpoints — find the endpoint for your region
Common examples of RAM policies — set fine-grained access control for your RAM user
s3fs options reference — tune s3fs mount parameters
goofys benchmarks — compare goofys performance characteristics