File System Permissions
Overview
You can add permissions rules to grant different permissions to different clients.
There is a default rule (*, rw, no_root_squash), which grants all client users with read/write permissions to access the file system and does not map the root user to an unprivileged account. You can delete this rule if needed.
Considerations
- A maximum of 64 permissions rules can be added for a file system.
- Permissions rules can be added or deleted, but there should be at least one permissions rule for a file system.
Authorized IP Address Ranges
You can configure authorized IP address ranges in either of the following ways:
- *: means any IP address.
- CIDR blocks:
A CIDR block uses a variable-length subnet mask to show the ratio of the network bits to host address bits within a range of IP addresses.
A suffix value is added at the end of an IP address to form a CIDR block. This suffix shows the bits of the network address.
For example, 192.1.1.0/24 is an IPv4 CIDR block, in which the first 24 bits (192.1.1) are the network address. Any IP address whose first 24 bits are the same as those of 192.1.1.0 will be applied with this permissions rule. In other words, 192.1.1.1 and 192.1.1.1/32 have the same effect.
Types of Permissions
There are access permissions and squash permissions.
Permissions |
Description |
---|---|
rw |
Client users have the read/write permissions. |
ro |
Client users have the read-only permissions. |
none |
Client users have no permissions to access the file system. |
Permissions |
Description |
---|---|
all_squash |
All client users access the file system as the nobody user. |
root_squash |
The root user of a client accesses the file system as the nobody user. |
no_root_squash |
All client users (including the root user) who access the file system will not mapped to the nobody user. |
If an IP address is matched with two permissions rules, the more accurate rule will be applied. For example, if 1.1.1.1 is matched with both permissions rules (1.1.1.1, ro, root_squash) and (*, rw, no_root_squash), the more accurate rule (1.1.1.1, ro, root_squash) will be applied.
Adding an Authorized IP Address
You can add authorized IP addresses on the console for permissions management.
To manage file system permissions through APIs, see section "Permissions Management" in the Scalable File Service Turbo API Reference.
- Log in to the SFS Turbo console.
- In the file system list, find the SFS Turbo file system you want to add authorized IP addresses and click its name to go to its details page.
- On the Authorizations tab, click Add.
Figure 1 Adding an authorized IP address or range
- On the displayed page, add authorized IP addresses based on Table 3.
You can add a maximum of 64 permissions rules for a file system and five authorized IP addresses at a time.
Table 3 Parameters for adding an authorized IP address or range Parameter
Description
Authorized Address
- Enter one IPv4 address or range in each line.
- Enter a valid IPv4 address or range that is not starting with 0 except 0.0.0.0/0. If you add 0.0.0.0/0, any IP address within this VPC will be authorized to access the file system. Do not enter an IP address or IP address range starting with any number ranging from 224 to 255, for example 224.0.0.1 or 255.255.255.255, because class D and class E IP addresses are not supported. IP addresses starting with 127 are also not supported. If you enter an invalid IP address or IP address range, the authorization may fail to be added, or the added authorization does not work.
- If you enter an IP address range, enter it in the format of IP address/mask. For example, enter 192.168.1.0/24. Do not enter 192.168.1.0-255 or 192.168.1.0-192.168.1.255. The number of bits in a subnet mask must be an integer ranging from 0 to 31, and mask value 0 is valid only in 0.0.0.0/0.
- For details about IP address ranges, see Authorized IP Address Ranges.
Read-Write Permission
The following options are available. rw is preselected.
- rw: Client users have the read/write permissions.
- ro: Client users have the read-only permissions.
- none: Client users have no permissions to access the file system.
User Permission
The following options are available. all_squash is preselected.
- all_squash: All client users access the file system as the nobody user.
- root_squash: The root user of a client accesses the file system as the nobody user.
- no_root_squash: All client users (including the root user) who access the file system will not be mapped to the nobody user.
- Confirm the information and click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot