tencent cloud

All product documents
Cloud File Storage
User Permission Management
Last updated: 2024-01-22 22:15:48
User Permission Management
Last updated: 2024-01-22 22:15:48
This document describes how to set the access permissions of users and user groups based on the POSIX syntax in a file system, which can be Standard (NFS), High-Performance (NFS), Standard Turbo, or High-Performance Turbo.

Prerequisites

You have mounted the file system over the Turbo or NFSv3 protocol as instructed in Using CFS Turbo on Linux Clients or Using CFS File Systems on Linux Clients.

Command description

Command
Description
getfacl <filename>
View the current ACL of the file.
setfacl -m g:cfsgroup:w <filename>
Set the write permission for the cfsgroup user group.
setfacl -m u:cfsuser:w <filename>
Set the write permission for the cfsuser user.
setfacl -x g:cfsgroup <filename>
Delete the permission of the players user group.
getfacl file1 | setfacl --set-file=- file2
Copy the ACL of file1 to file2.
setfacl -b file1
Delete all extended ACL rules and retain basic ACL rules (owner, group, and others).
setfacl -k file1
Delete all default rules from file1.
setfacl -R -m g:cfsgroup:rw dir
Grant the cfsgroup user group the permission to read/write files and directories in the dir directory tree.
setfacl -d -m g:cfsgroup:rw dir
Grant the cfsgroup user group the permission to read/write newly created files and directories in the dir directory tree.

Example

sudo useradd cfsuser # Create the `cfsuser` user
sudo useradd otheruser # Create the `otheruser` user
sudo groupadd cfsgroup # Create the `cfsgroup` user group
sudo usermod -g cfsgroup cfsuser # Allocate `cfsuser` to `cfsgroup`
sudo touch file1 # Create a file named `file1`
sudo setfacl -m g:cfsgroup:r-x file1 # Grant the `cfsgroup` user group the permission to read and execute `file1`
sudo setfacl -m u:otheruser:rwx file1 # Grant the `otheruser` user the permission to read/write and execute `file1`

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon