All Products
Search
Document Center

Object Storage Service:Configure the permissions on a directory to which a bucket is mounted

Last Updated:Jun 17, 2026

You can configure user permissions on a local mount-point directory when you use ossfs to mount an Object Storage Service (OSS) bucket.

Prerequisites

Scenarios

  1. Share the permissions to access a directory to which a bucket is mounted: Other users can access the mount-point directory but not the files in it.

  2. Share the permissions to access a directory to which a bucket is mounted and the permissions to write, read, and execute all files in the directory: Other users can access the mount-point directory and have full read, write, and execute permissions on all files in it.

  3. Share the permissions to access a directory to which a bucket is mounted and specific permissions on files in the directory: Other users can access the mount-point directory and have custom permissions on files in it.

Parameters

Parameter

Description

allow_other

Allows other users to access the mount-point directory, but not the files in it. You can run the chmod command to modify file permissions separately. No value is required. To enable this option, add -oallow_other.

umask

Sets the permission mask for files and folders in the mount-point directory.

For example, -oumask=007 sets the permissions to 770, and -oumask=077 sets the permissions to 700.

Mounting examples

  • Share the permissions to access a directory to which a bucket is mounted

    To mount an OSS bucket named mybucket to a local directory named /mnt/oss and grant other users access to the directory, run the following command:

    ossfs mybucket /mnt/oss -ourl=http://oss-cn-****.aliyuncs.com -oallow_other
  • Share the permissions to access a directory to which a bucket is mounted and the permissions to write, read, and execute all files in the directory

    To mount an OSS bucket named mybucket to a local directory named /mnt/oss and grant other users full read, write, and execute permissions on the directory and its files, run the following command:

    ossfs mybucket /mnt/oss -ourl=http://oss-cn-****.aliyuncs.com -oallow_other -oumask=000
  • Share the permissions to access a directory to which a bucket is mounted and specific permissions on files in the directory

    Note

    Use the -oumask parameter to grant different permissions on files to different users.

    To mount an OSS bucket named mybucket to a local directory named /mnt/oss and grant other users read, write, and execute permissions on the files, run the following command:

    ossfs mybucket /mnt/oss -ourl=http://oss-cn-****.aliyuncs.com -oallow_other -oumask=000