Quick installation

Last Updated: May 27, 2018


ossfs allows you to mount Alibaba Cloud OSS buckets to local files in Linux systems. In the system, you can quickly use the local file system to perform operations on OSS objects, achieving data sharing.


The ossfs is constructed based on S3FS and incorporates all S3FS functions. Key functions include:

  • Supports most functions of the POSIX file system, including file reading/writing, directories, link operations, permissions, UID/GID, and extended attributes.
  • Uploads large files using the OSS multipart function.
  • Guarantees data integrity with MD5 checksum.


Compared with a local file system, the functions and performance provided by ossfs have certain limitations. These include:

  • Random write or any appended operations causes rewrite of the entire file.
  • The performance of metadata operations, such as list directory, is poor because the system has to remotely access the OSS server.
  • The file/folder rename operation is not atomic.
  • When multiple clients are attached to a single OSS bucket, you must coordinate the actions of each client manually. For example, you must avoid multiple clients writing the same file.
  • Hard link is not supported.
  • This system is not suitable for highly-concurrent read/write scenarios, as this greatly increases the system load.

Installation and use

Installation package download:

Released Linux Download
Ubuntu 16.04 (x64) ossfs_1.80.5_ubuntu16.04_amd64.deb
Ubuntu 14.04 (x64) ossfs_1.80.5_ubuntu14.04_amd64.deb
CentOS 7.0 (x64) ossfs_1.80.5_centos7.0_x86_64.rpm
CentOS 6.5 (x64) ossfs_1.80.5_centos6.5_x86_64.rpm

Due to the lower version of the Linux distribution, the kernel version is relatively lower. The ossfs is prone to disconnection or other problems during the running process. Therefore, users are advised to upgrade the operating system to CentOS 7.0 or Ubuntu 14.04 or later.

Install the ossfs

  • Run these commands to install Ubuntu:
  1. sudo apt-get update
  2. sudo apt-get install gdebi-core
  3. sudo gdebi your_ossfs_package
  • Run these commands to install CentOS 6.5 or later:
  1. sudo yum localinstall your_ossfs_package
  • Run these commands to install CentOS 5 or later:
  1. sudo yum localinstall your_ossfs_package --nogpgcheck

Use the ossfs

Set bucket name and AccessKeyId/Secret and save it to the /etc/passwd-ossfs file.

Note that the permissions for this file must be set correctly. We suggest setting it to 640.

  1. echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs
  2. chmod 640 /etc/passwd-ossfs

Mount the OSS bucket to the specified directory.

  1. ossfs my-bucket my-mount-point -ourl=my-oss-endpoint


Mount the bucket my-bucket to the /tmp/ossfs directory. The AccessKeyId is faint, the AccessKeySecret is 123, and the OSS endpoint is http://oss-cn-hangzhou.aliyuncs.com.

  1. echo my-bucket:faint:123 > /etc/passwd-ossfs
  2. chmod 640 /etc/passwd-ossfs
  3. mkdir /tmp/ossfs
  4. ossfs my-bucket /tmp/ossfs -ourl=http://oss-cn-hangzhou.aliyuncs.com

Unmount the bucket:

  1. fusermount -u /tmp/ossfs

For more information, see here.

Release log

For more information, see here.

Thank you! We've received your feedback.