Why am I unable to mount an SMB file system on a Windows operating system later than Windows Server 2016?

  • Symptom

    An error occurred while the following command is run.

    C:\Users\Administrator>net use z: \\xxxxx-xxxx.xxxxx.nas.aliyuncs.com\myshare
    System error 1272 has occurred.
    You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.
  • Solution

    This error occurs because the security policies of a Windows operating system later than Windows Server 2016 do not allow guest users to access remote shared directories.

    Perform the following steps to fix the error:

    • Locate the following registry key.
      [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
      "AllowInsecureGuestAuth"=dword:0

      Modify the key.

      [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
      "AllowInsecureGuestAuth"=dword:1
    • Switch to Powershell and run the following command.
      New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force

    For more information, see Guest access in SMB2 disabled by default in Windows 10, Windows Server 2016 version 1709, and Windows Server 2019.

How can I mount an SMB file system on a Linux ECS instance?

For information about how to access an SMB file system from a Linux ECS instance, see Access an SMB file system from a Linux ECS instance.

  • Run the following command to mount the file system.
    mount -t cifs [MOUNT POINT] [LOCAL DIRECTORY] -o username=guest,vers=3.0
  • You must enter a password for the -o username=guest mount option if you are running the latest version of Linux. We recommend that you use the following command.
    mount -t cifs [MOUNT POINT] [LOCAL DIRECTORY] -o guest,vers=3.0
Note The command used to mount an SMB file system varies based on the version of the Linux operating system.

Why am I unable to mount an SMB file system?

  • Symptom

    The net use command is used for mounting SMB file systems. However, the command may be used to mount NFS file systems by mistake. Then, when you attempt to mount an SMB file system, the SMB file system cannot be mounted.

  • Solution

    Make sure that the protocol of the file system is SMB. Then, stop mounting the file system and retry after five minutes or more. Submit a ticket if the SMB file system still cannot be mounted.

Why is a mounted SMB directory available only to the administrator?

User accounts in Windows are isolated from one another.

To enable access for multiple users, you must create a shared directory. For example, you can create a shared directory named myshare on drive C by using the following command.
mklink /D C:\myshare \\xxxxxxx-xxxx.cn-beijing.nas.aliyuncs.com\myshare\

Why is IIS on an ECS instance running Windows Server 2016 unable to load files from a shared SMB volume?

See Install and configure Active Directory domains.

What can I do if an error occurs while I am using IIS to access an Apsara File Storage NAS file system?

An HTTP error 500.19 with error code 0x8007003a occurs while you are mounting an SMB file system on an ECS instance running Windows Server 2016. For more information about how to troubleshoot an HTTP error 500.19 with error code 0x8007003a that occurs while you are mounting an SMB file system on an ECS instance running Windows Server 2016, see Best practices for using IIS to access an Apsara File Storage NAS file system.

Can I mount an NFS file system and SMB file system on the same ECS instance?

No, an NFS file system and SMB file system cannot be mounted on the same ECS instance.

We recommend that you do not access an SMB file system by using a Linux client due to compatibility issues. For example, the supported character sets and the length of a file name for Windows and Linux are different. In Windows, a maximum length of 255 wide characters encoded with Unicode is supported. In Linux, a maximum length of 255 characters encoded with UTF-8 is supported.

If you need to mount an NFS file system and an SMB file system on the same ECS instance, you can mount an SMB file system on a Linux ECS instance whose kernel supports SMB 2 or later.

Run either one of the following mount commands: mount -t cifs -o vers=2.0 \\<A mount target>\myshare /mnt or mount -t cifs -o vers=2.0 //<A mount target>/myshare /mnt. If a password is required, press Enter.

To check whether your Linux kernel supports the CIFS protocol, view the value of CONFIG_CIFS in the /boot directory. A value of y or m indicates that the protocol is supported and a CIFS file system can be mounted.

Note
  • You must install cifs-utils before running the preceding command. For example, you can run the following command on CentOS to install cifs-utils.
    yum install samba-client samba-common cifs-utils
  • If the CIFS protocol is not supported on the current version of Linux, we recommend that you upgrade the Linux kernel to version 3.10.0-514 or later.