Help Center> Scalable File Service> User Guide> Network Configuration> Configuring Cross-Account Access

Configuring Cross-Account Access

Scenarios

In addition to multi-VPC access, SFS Capacity-Oriented also supports cross-VPC access across accounts.

If VPC IDs used by other accounts are added to the VPC list of a file system and IP addresses or address segments of ECSs are added to the authorized address list, ECSs of different VPCs and of different accounts can share the same file system.

For more information about VPC, see the Virtual Private Cloud.

An SFS Turbo file system allows two or more VPCs in the same region to interconnect with each other through VPC peering connection. In this case, different VPCs are in the same network, and ECSs in these VPCs can share the same file system whatever these VPCs belong to the same account or not. For details about VPC peering connection, see VPC Peering Connection.

This section describes how to use different accounts to access an SFS Capacity-Oriented file system from different VPCs. Currently, only CN North-Beijing4 supports cross-account access.

Restrictions

  • You can add a maximum of 20 VPCs for each file system. A maximum of 400 ACL rules for added VPCs can be created.
  • If a VPC bound to the file system has been deleted from the VPC console, the IP address/address segment of this VPC in the VPC list of the file system can still be seen as activated. However, this VPC cannot be used any longer and you are advised to delete the VPC from the list.

Procedure

  1. Log in to SFS Console.
  2. In the file system list, click the name of the target file system. On the page that is displayed, locate the Authorizations area.
  3. Click Tenant authorized to add VPC to add VPCs used by other accounts for the file system. A dialog box is displayed. See Figure 1.

    Figure 1 Adding a VPC of an authorized tenant
    Table 1 describes the parameters to be configured.
    Table 1 Description

    Parameter

    Description

    VPC

    Enter the VPC ID of the VPC to be added. You can obtain the VPC ID on the details page of the target VPC on the VPC console.

    Authorized Address/Segment

    • Only one IPv4 address or address segment can be entered.
    • The entered IPv4 address or address segment must be valid and cannot be an IP address or address segment starting with 0 except 0.0.0.0/0. The value 0.0.0.0/0 indicates any IP address in the VPC. In addition, the IP address or address segment cannot start with 127 or any number from 224 to 255, such as 127.0.0.1, 224.0.0.1, or 255.255.255.255. This is because IP addresses or address segments starting with any number from 224 to 239 are class D addresses and they are reserved for multicast. IP addresses or address segments starting with any number from 240 to 255 are class E addresses and they are reserved for research purposes. If an invalid IP address or address segment is used, the access rule may fail to be added or the added access rule cannot take effect.
    • Multiple addresses separated by commas (,), such as 10.0.1.32,10.5.5.10 are not allowed.
    • An address segment, for example, 192.168.1.0 to 192.168.1.255, needs to be in the mask format like 192.168.1.0/24. Other formats such as 192.168.1.0-255 are not allowed. The number of bits in a subnet mask must be an integer ranging from 0 to 31. The number of bits 0 is valid only in 0.0.0.0/0.

    Priority

    The value must be an integer ranging from 0 to 100. 0 indicates the highest priority, and 100 indicates the lowest priority. In the same VPC, the permission of the IP address or address segment with the highest priority is preferentially used. If some IP addresses or address segments are of the same priority, the permission of the most recently added or modified one is used. For example, if the IP address for mounting is 10.1.1.32 and both 10.1.1.32 (read/write) with priority 100 and 10.1.1.0/24 (read-only) with priority 50 meet the requirements, the permission of 10.1.1.0/24 (read-only) with priority 50 is used. That is, if there is no other authorized priority, the permission of all IP addresses in the 10.1.1.0/24 segment, including 10.1.1.32, is read-only.

    Read&Write Permissions

    The value can be Read&Write or Read-only. The default value is Read&Write.

    User Permission

    Specifies whether to retain the user identifier (UID) and group identifier (GID) of the shared directory. The default value is no_all_squash.

    • all_squash: The UID and GID of a shared directory are mapped to user nobody, which is applicable to public directories.
    • no_all_squash: The UID and GID of a shared directory are retained.

    This parameter is not involved when an authorized address is added for a CIFS file system.

    User Root Permission

    Specifies whether to allow the root permission of the client. The default value is no_root_squash.

    • root_squash: Clients cannot access as the root user. When a client accesses as the root user, the user is mapped to the nobody user.
    • no_root_squash: Clients are allowed to access as the root user who has full control and access permissions of the root directories.

    This parameter is not involved when an authorized address is added for a CIFS file system.

  4. Click OK. The added VPC is displayed in the list.
  5. Click on the left of the VPC name to view details about the IP addresses/segments added to this VPC. You can add, edit, or delete IP addresses/segments. In the Operation column of the target VPC, click Add. The Add Authorized Address/Segment dialog box is displayed. See Figure 2. Table 1 describes the parameters to be added.

    Figure 2 Adding an authorized address or segment

Verification

After another user's VPC is configured for the file system, if the file system can be mounted to ECSs in the VPC and the ECSs can access the file system, the configuration is successful.