File System Permissions Management
Overview
You can add permission rules to grant different permissions to different clients. Only Standard, Standard-Enhanced, Performance, and Performance-Enhanced file systems support permissions rules.
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 change 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.
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 permission 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 | Users have the read/write permissions. |
ro | Users have the read-only permissions. |
none | Users have no permissions to access the file system. |
Permissions | Description |
---|---|
all_squash | All users access the file system as the nobody user. |
root_squash | The root user accesses the file system as the nobody user. |
no_root_squash | All client users (including root) 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 "Creating a Permission Rule" the Scalable File Service API Reference
- Log in to the SFS 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 Add Authorized Address
- On the displayed page, add authorized IP addresses based on Table 3.Note
You can add a maximum of 64 permission 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 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.
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 root) who access the file system will not be mapped to the nobody user.
- Confirm the information and click OK.
Follow-Up Operations
You can click Edit in the Operation column of a permission rule to modify the read/write permission and user permission, or click Delete to delete a permission rule.
- Overview
- Considerations
- IP Address Ranges
- Types of Permissions
- Adding an Authorized IP Address
- Follow-Up Operations