This topic describes how to mount and access a share that uses the SMB protocol on a Windows system.
Prerequisites
An SMB protocol share is created. For more information, see Create a share.
An Elastic Compute Service (ECS) instance that runs Windows is created. For more information, see Create an ECS instance.
Make sure that port 445 is open. SMB protocol shares communicate over port 445. If port 445 is not open, add a security group rule for port 445 in the security group of the destination ECS instance. For more information, see Use security groups.
You can mount a maximum of 16 SMB shares. This limit varies based on the CPU and memory of the gateway model. For more information, see Product specifications.
After you mount the share, the maximum capacity of the file system that is displayed varies by gateway specification. For more information, see the recommended maximum capacity of a shared file system in File gateway specifications.
Starting from version 1.0.35, if no users are configured, clients access the SMB share as Public by default. If users are configured, you must grant the users read and write permission or read-only permission before they can access the SMB share. 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 the client information from the Windows system. You do not need to restart the client.
Step 1: Prepare the environment
Perform the following steps only once when you mount a share on each Windows server for the first time. You do not need to repeat these steps for subsequent mounts.
For the following operating system versions, configure permissions to allow anonymous client access.
For Windows Server 2016 and later, run the following command.
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters /f /v AllowInsecureGuestAuth /t REG_DWORD /d 1For Windows Server 2025, you must also perform the following operations to disable SMB signing:
Open Command Prompt as an administrator and run the following command:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v RequireSecuritySignature /t REG_DWORD /d 0 /fRestart the computer for the changes to take effect.
Enable the Workstation service.
Choose , or press the
Win+Rkeyboard shortcut. Then, enterservices.mscto open the local services.In the list of services, find Workstation. Make sure that its status is Running and its startup type is Automatic.
By default, the Workstation service is running.

Enable the TCP/IP NetBIOS Helper service.
Open Network and Sharing Center and click the network that the host is connected to.
Click Properties, double-click Internet Protocol Version 4 (TCP/IPv4) to open the properties dialog box, and then click Advanced.
In the Advanced TCP/IP Settings dialog box, choose .

Choose , or press the
Win+Rkeyboard shortcut. Then, enterservices.mscto open the local services.In the list of services, find TCP/IP NetBIOS Helper. Make sure that its status is Running and its startup type is Automatic.
By default, the TCP/IP NetBIOS Helper service is running.

Step 2: Mount the SMB protocol share
You can mount an SMB protocol share manually or automatically. A manual mount is temporary and must be redone after the server restarts. An automatic mount is persistent. To avoid losing access to the file system after a server restart, configure an automatic mount after you successfully mount the share manually.
Manually mount an SMB share
Open a Command Prompt window and run the following command to mount the SMB share.
net use Z: \\gateway_ip\share_nameParameter
Description
Z
The drive letter to which you want to mount the share on the current Windows system. If there is a conflict, or if multiple SMB shares are mounted, drive letters are assigned in reverse alphabetical order.
gateway_ip
The IP address of the Cloud Storage Gateway. Replace it with the actual value. You can find the mount target on the Shares page for the target Cloud Storage Gateway in the Cloud Storage Gateway console. The IPv4 mount target is displayed by default.
NoteOnly the China (Hohhot) region supports mounting shares using an IPv6 address. The VPC and vSwitch that the gateway uses must support IPv6.
Before you mount a share using an IPv6 address, make sure that the ECS client is configured with an IPv6 address.
If the VPC and vSwitch that an existing gateway uses support IPv6, you can enable IPv6 for the gateway. The IPv6 mount target is then displayed by default on the second line of the mount target information. New gateways that are created in this VPC support IPv6 by default and you do not need to enable it.
share_name
The name of the SMB share.
Confirm that the SMB protocol share is mounted.
Run the command:
net useSample output
If output similar to the following is returned, the share is mounted. After the share is mounted, you can manage it in the same way that you manage a local folder. If the user has write permission, they can write data to the share. If the user has only read-only permission, they can only read files. For more information about user permissions for shares, see Manage shares.

(Optional) Automatically mount an SMB share
You can configure the c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\auto_mount.bat file on the Windows ECS instance to automatically mount the SMB protocol share when the ECS instance restarts.
Open a Command Prompt window and run the following command to configure the auto_mount.bat script.
echo %HOMEPATH%\mount.bat > auto_mount.batRun the following three commands to configure auto_mount.bat to run automatically after a user logs on and to grant read and execute permissions to other users.
MOVE auto_mount.bat "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"icacls "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\auto_mount.bat" /grant everyone:rxREG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /f /v MyMount /t REG_SZ /d "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\auto_mount.bat"Run the following command to configure the mount.bat mount script.
Mount without identity authentication
If identity authentication is not required, use the following command:
echo net use z: \\gateway_ip\share_name > "%HOMEPATH%\mount.bat"Replace the drive letter
z, gateway IP addressgateway_ip, and share nameshare_namewith their actual values.Mount with identity authentication
If you want to mount the SMB protocol share as an SMB user, run the following command to configure the script.
echo net use z: \\gateway_ip\share_name /user:username password > "%HOMEPATH%\mount.bat"Replace the drive letter
z, gateway IP addressgateway_ip, share nameshare_name, SMB usernameusername, and SMB user passwordpasswordwith their actual values.If you want to mount the SMB protocol share as a domain user other than the currently logged-on Windows user, run the following command to configure the script.
echo net use z: \\gateway_ip\share_name /user:username@domain password > "%HOMEPATH%\mount.bat"Replace the drive letter
z, gateway IP addressgateway_ip, share nameshare_name, domain usernameusername@domain, and domain user passwordpasswordwith their actual values.
Restart the ECS server.
After the user logs on again, run the
net usecommand to verify the mount result.ImportantRestarting the ECS instance interrupts services. We recommend that you restart the ECS instance during off-peak hours.
If you encounter other issues when you mount the share, see Troubleshoot mount failures.
More operations
To mount and access a share as an SMB user, see How do I use an SMB user to access an SMB share?.
To set access control list (ACL) permissions, such as read-only or read and write, for different users, see Use a Windows instance to build an AD domain and Join a file gateway to an AD domain.