All Products
Search
Document Center

Cloud Storage Gateway:Access a Cloud Storage Gateway from a client on a Windows operating system

Last Updated:Feb 03, 2026

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.

Note
  • 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.

  1. Connect to the ECS instance.

  2. For the following operating system versions, configure permissions to allow anonymous client access.

    1. 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 1
    2. For Windows Server 2025, you must also perform the following operations to disable SMB signing:

      1. 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 /f
      2. Restart the computer for the changes to take effect.

  3. Enable the Workstation service.

    1. Choose All Programs > Accessories > Run, or press the Win+R keyboard shortcut. Then, enter services.msc to open the local services.

    2. 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.

      Workstation

  4. Enable the TCP/IP NetBIOS Helper service.

    1. Open Network and Sharing Center and click the network that the host is connected to.

    2. Click Properties, double-click Internet Protocol Version 4 (TCP/IPv4) to open the properties dialog box, and then click Advanced.

    3. In the Advanced TCP/IP Settings dialog box, choose WINS > Enable NetBIOS over TCP/IP.启用 TCP/IP 上的 NetBIO

    4. Choose All Programs > Accessories > Run, or press the Win+R keyboard shortcut. Then, enter services.msc to open the local services.

    5. 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.

      TCP/IP NetBIOS Helpe

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

  1. Connect to the ECS instance.

  2. Open a Command Prompt window and run the following command to mount the SMB share.

    net use Z: \\gateway_ip\share_name

    Parameter

    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.

    Note
    • Only 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.

  3. Confirm that the SMB protocol share is mounted.

    • Run the command: net use

    • Sample 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.

      image

(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.

  1. Open a Command Prompt window and run the following command to configure the auto_mount.bat script.

    echo %HOMEPATH%\mount.bat > auto_mount.bat
  2. Run 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:rx
    REG 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"
  3. 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 address gateway_ip, and share name share_name with 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 address gateway_ip, share name share_name, SMB username username, and SMB user password password with 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 address gateway_ip, share name share_name, domain username username@domain, and domain user password password with their actual values.

  4. Restart the ECS server.

    After the user logs on again, run the net use command to verify the mount result.

    Important

    Restarting 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