This topic describes how to access a Server Message Block (SMB) share of a gateway from an Elastic Compute Service (ECS) instance that runs Windows.
Prerequisites
An SMB share is created. For more information, see Create a share.
A file gateway deployed on Alibaba Cloud can have up to 16 SMB shares. The maximum number of SMB shares supported by different types of gateways varies due to differences in CPU and memory specifications. For more information, see Specifications.
After shares are mounted, the displayed maximum capacity of file systems varies based on the file gateway specifications. For more information, see the recommended file system capacity provided in the Specifications of cloud file gateways table.
Starting from V1.0.35, if no user is configured for an SMB share, a client accesses the SMB share as a public user by default. If you have added users, they can access the SMB share only if they are granted read/write permissions or read-only permissions. For more information, see Configure an SMB share.
After you change the permissions of an SMB user, run the net use /delete < share path > command to clear connection information cached on the Windows client. You do not need to restart the client.
Procedure
Log on to the ECS console.
Connect to the Windows ECS instance. For more information, see Connect to an instance.
Open This PC and select Map network drive.
Select a drive on which you want to mount the SMB share.
IPv4: Enter the mount target that uses IPv4 in the Folder field.
IPv6: Enter the mount target that uses IPv6 in the Folder field.
NoteYou can mount a share over IPv6 only in the China (Hohhot) region. Make sure that the virtual private cloud (VPC) and vSwitch of the gateway support IPv6.
If you want to mount a share over IPv6, make sure that an IPv6 address is configured for the ECS instance.
If the VPC and vSwitch of an existing gateway support IPv6 and you enable IPv6 for the gateway, the second mount target row displays an IPv6 mount target. Subsequent gateways created in this VPC support IPv6 by default.
The mount target consists of the IP address of the gateway and the name of the share. To query the mount target of a gateway, log on to the CSG console and go to the Shares tab of the gateway details page. By default, a gateway displays IPv4 mount targets.
ImportantIf you are using an operating system later than Windows 2016 and encounter the error shown in the following figure in a share mount operation, run the
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters /f /v AllowInsecureGuestAuth /t REG_DWORD /d 1
command to grant anonymous access permission to the client.CSG does not support anonymous access from Windows Server 2025.
Click Finish and enter the username and password of the Common Internet File System (CIFS) user.
If you have joined an Active Directory (AD) domain, prefix the user name with the domain in the <domain><username> format.
After you mount the share, check the result.
If a window similar to the following one appears, the SMB share is mounted.
Access the share.
After the share is mounted, you can access the share in the same way that you access a local directory. If you have write permissions on the share, you can write data to the share. If you have read-only permissions on the share, you can only read data from the share. For more information about access permissions on shares, see Configure an SMB share.
NoteA share of a gateway is synchronized with the Object Storage Service (OSS) bucket associated with the share. When you manage a data in a share, the changes to data in the share are also applied to data in the associated OSS bucket.
If you encounter an error when you mount a share, see What can I do if I cannot mount an SMB share on Windows Server 2019?