When you try to connect to an Azure file share in Windows, you might receive the following error messages.
Error 5 when you mount an Azure file share
- System error 5 has occurred. Access is denied.
Cause 1: Unencrypted communication channel
For security, connections to Azure file shares are blocked if the communication channel isn't encrypted and the connection attempt isn't made from the same datacenter where the Azure file shares reside. If the Secure transfer required setting is enabled on the storage account, unencrypted connections within the same datacenter are also blocked. An encrypted communication channel is only provided if the end-user's client OS supports SMB encryption.
Windows 8, Windows Server 2012, and later versions of each system negotiate requests that include SMB 3.x, which supports encryption.
- Connect from a client that supports SMB encryption (Windows 8/Windows Server 2012 or later).
- Connect from a virtual machine (VM) in the same datacenter as the Azure storage account that's used for the Azure file share.
- Verify the Secure transfer required setting is disabled on the storage account if the client doesn't support SMB encryption.
Cause 2: Virtual network or firewall rules are enabled on the storage account
Network traffic is denied if the virtual network (VNET) and firewall rules are configured on the storage account, unless the client IP address or virtual network is allow-listed.
Verify that virtual network and firewall rules are configured properly on the storage account. To test if the virtual network or firewall rules are causing the issue, temporarily change the setting on the storage account to Allow access from all networks. To learn more, see Configure Azure Storage firewalls and virtual networks.
Cause 3: Share-level permissions are incorrect when using identity-based authentication
If users are accessing the Azure file share using identity-based authentication, access to the file share fails with the "Access is denied" error if share-level permissions are incorrect.
Validate that share-level permissions are configured correctly. See Assign share-level permissions. Share-level permission assignments are supported for groups and users that have been synced from AD DS to Microsoft Entra ID using Microsoft Entra Connect Sync or Microsoft Entra Connect cloud sync. Confirm that groups and users being assigned share-level permissions aren't unsupported "cloud-only" groups.
Error 53, Error 67, or Error 87 when you mount or unmount an Azure file share
When you try to mount a file share from on-premises or a different datacenter, you might receive the following errors:
- System error 53 has occurred. The network path was not found.
- System error 67 has occurred. The network name cannot be found.
- System error 87 has occurred. The parameter is incorrect.
Cause 1: Port 445 is blocked
System error 53 or System error 67 can occur if port 445 outbound communication to an Azure Files datacenter is blocked. To see the summary of ISPs that allow or disallow access from port 445, go to TechNet.
To check if your firewall or ISP is blocking port 445, use the AzFileDiagnostics tool or the Test-NetConnection
cmdlet.
To use the Test-NetConnection
cmdlet, the Azure PowerShell module must be installed. See Install Azure PowerShell module for more information. Remember to replace <your-storage-account-name>
and <your-resource-group-name>
with the relevant names for your storage account.
$resourceGroupName = "<your-resource-group-name>"
$storageAccountName = "<your-storage-account-name>"
$storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName
Test-NetConnection -ComputerName ([System.Uri]::new($storageAccount.Context.FileEndPoint).Host) -Port 445
If the connection was successful, you should see the following output:
ComputerName : <your-storage-account-name>
RemoteAddress : <storage-account-ip-address>
RemotePort : 445
InterfaceAlias : <your-network-interface>
SourceAddress : <your-ip-address>
TcpTestSucceeded : True
Note
This command returns the current IP address of the storage account. This IP address is not guaranteed to remain the same, and may change at any time. Don't hardcode this IP address into any scripts, or into a firewall configuration.
Solution 1 — Use Azure File Sync as a QUIC endpoint You can use Azure File Sync as a workaround to access Azure Files from clients that have port 445 blocked. Although Azure Files doesn't directly support SMB over QUIC, Windows Server 2022 Azure Edition does support the QUIC protocol. You can create a lightweight cache of your Azure file shares on a Windows Server 2022 Azure Edition VM using Azure File Sync. This configuration uses port 443, which is widely open outbound to support HTTPS, instead of port 445. To learn more about this option, see SMB over QUIC with Azure File Sync.
Solution 2 — Use VPN or ExpressRoute By setting up a virtual private network (VPN) or ExpressRoute from on-premises to your Azure storage account, with Azure Files exposed on your internal network using private endpoints, the traffic will go through a secure tunnel as opposed to over the internet. Follow the instructions to setup a VPN to access Azure Files from Windows.
Solution 3 — Unblock port 445 with help from your ISP/IT admin Work with your IT department or ISP to open port 445 outbound to Azure IP ranges.
Solution 4 — Use REST API-based tools like Storage Explorer or PowerShell Azure Files also supports REST in addition to SMB. REST access works over port 443 (standard tcp). There are various tools that are written using REST API that enable a rich UI experience. Storage Explorer is one of them. Download and Install Storage Explorer and connect to your file share backed by Azure Files. You can also use PowerShell that also uses REST API.
Cause 2: NTLMv1 is enabled
System error 53 or system error 87 can occur if NTLMv1 communication is enabled on the client. Azure Files supports only NTLMv2 authentication. Having NTLMv1 enabled creates a less-secure client. Therefore, communication is blocked for Azure Files.
To determine whether this is the cause of the error, verify that the following registry subkey isn't set to a value less than 3:
HKLM\SYSTEM\CurrentControlSet\Control\Lsa > LmCompatibilityLevel
For more information, see the LmCompatibilityLevel topic on TechNet.
Revert the LmCompatibilityLevel
value to the default value of 3 in the following registry subkey:
HKLM\SYSTEM\CurrentControlSet\Control\Lsa
Failed with error code 0x800704b3
When you try to mount an Azure file share, you receive the following error:
Error code: 0x800704b3
Symbolic Name: ERROR_NO_NET_OR_BAD_PATH
Error description: The network path was either typed incorrectly, does not exist, or the network provider is not currently available. Please try retyping the path or contact your network administrator.
This error can occur if any core Windows network related services are disabled as any service that explicitly depends on those network services will fail to start.
Check if any of the following services are in a Stopped state in the Windows VM:
- Network Connections
- Network List Service
- Network Location Awareness
- Network Store Interface Service
- DHCP Client
- TCP/IP NetBIOS Helper
- Workstation
If you find any, start the service(s) and retry mounting the Azure file share.
Application or service can't access a mounted Azure Files drive
Drives are mounted per user. If your application or service is running under a different user account than the one that mounted the drive, the application won't see the drive.
Use one of the following solutions:
Mount the drive from the same user account that contains the application. You can use a tool such as PsExec.
Pass the storage account name and key in the user name and password parameters of the net use
command.
Use the cmdkey
command to add the credentials into Credential Manager. Perform this action from a command line under the service account context, either through an interactive login or by using runas
.
cmdkey /add:<storage-account-name>.file.core.windows.net /user:AZURE\<storage-account-name> /pass:<storage-account-key>
Map the share directly without using a mapped drive letter. Some applications might not reconnect to the drive letter properly, so using the full UNC path might be more reliable:
net use * \\storage-account-name.file.core.windows.net\share
After you follow these instructions, you might receive the following error message when you run net use for the system/network service account: "System error 1312 has occurred. A specified logon session does not exist. It may already have been terminated." If this error appears, make sure that the username that's passed to net use
includes domain information (for example: [storage account name].file.core.windows.net
).
No folder with a drive letter in "My Computer" or "This PC"
If you map an Azure file share as an administrator by using the net use
command, the share appears to be missing.
By default, Windows File Explorer doesn't run as an administrator. If you run net use
from an administrative command prompt, you map the network drive as an administrator. Because mapped drives are user-centric, the user account that is logged in doesn't display the drives if they're mounted under a different user account.
Mount the share from a non-administrator command line. Alternatively, you can follow this TechNet topic to configure the EnableLinkedConnections
registry value.
Net use command fails if the storage account contains a forward slash
The net use
command interprets a forward slash (/) as a command-line option. If your user account name starts with a forward slash, the drive mapping fails.
You can use either of the following steps to work around the problem:
Run the following PowerShell command:
New-SmbMapping -LocalPath y: -RemotePath \\server\share -UserName accountName -Password "password can contain / and \ etc"
From a batch file, you can run the command this way:
Echo new-smbMapping ... | powershell -command –
Put double quotation marks around the key to work around this problem--unless the forward slash is the first character. If it is, either use the interactive mode and enter your password separately or regenerate your keys to get a key that doesn't start with a forward slash.
New-PSDrive command fails with "the network resource type is not correct" error
You might see this error message if the file share isn't accessible. For example, port 445 is blocked or there's a DNS resolution issue.
Make sure port 445 is open and check DNS resolution and connectivity to your file share.
Linux clients can use AzFileDiagnostics to automate symptom detection and ensure that they have the correct prerequisites.
Common causes for this problem are:
- You're using a Linux distribution with an outdated SMB client. See Use Azure Files with Linux for more information on common Linux distributions available in Azure that have compatible clients.
- SMB utilities (cifs-utils) aren't installed on the client.
- The minimum SMB version, 2.1, isn't available on the client.
- SMB 3.x encryption isn't supported on the client. The preceding table provides a list of Linux distributions that support mounting from on-premises and cross-region using encryption. Other distributions require kernel 4.11 and later versions.
- You're trying to connect to an Azure file share from an Azure VM, and the VM isn't in the same region as the storage account.
- If the Secure transfer required setting is enabled on the storage account, Azure Files will allow only connections that use SMB 3.x with encryption.
To resolve the problem, use the troubleshooting tool for Azure Files mounting errors on Linux. This tool:
- Helps you to validate the client running environment.
- Detects the incompatible client configuration that would cause access failure for Azure Files.
- Gives prescriptive guidance on self-fixing.
- Collects the diagnostics traces.
"Mount error(13): Permission denied" when you mount an Azure file share
Cause 1: Unencrypted communication channel
For security reasons, connections to Azure file shares are blocked if the communication channel isn't encrypted and the connection attempt isn't made from the same datacenter where the Azure file shares reside. Unencrypted connections within the same datacenter can also be blocked if the Secure transfer required setting is enabled on the storage account. An encrypted communication channel is only provided if the user's client OS supports SMB encryption.
To learn more, see Prerequisites for mounting an Azure file share with Linux and the cifs-utils package.
- Connect from a client that supports SMB encryption or connect from a virtual machine in the same datacenter as the Azure storage account that's used for the Azure file share.
- Verify the Secure transfer required setting is disabled on the storage account if the client doesn't support SMB encryption.
Cause 2: Virtual network or firewall rules are enabled on the storage account, or port 445 is blocked
If virtual network (VNET) and firewall rules are configured on the storage account, network traffic will be denied access unless the client IP address or virtual network is allowed access. In addition, if your company or ISP blocks port 445 outbound, you won't be able to mount the share.
Verify that the VNET and firewall rules are configured properly on the storage account, and that port 445 is allowlisted. To test if virtual networks or firewall rules cause the issue, you can temporarily change the setting on the storage account to Allow access from all networks. To learn more, see Configure Azure Storage firewalls and virtual networks.
Azure Files only supports NTLMv2 (storage account key only) and Kerberos authentication for SMB file shares. NTLMv1 isn't supported. Kernel 3.3 and later versions default to NTLMv2 unless overridden with the sec
mount option. Kernel 4.4 and later versions enable NTLMv2 by default and disable LANMAN. Under default configurations, NTLMv1 is kept as a negotiation only option. For more information, see your OS documentation.
Ensure that SMB mount commands don't override the default NTLMv2 authentication via the sec
option. The sec
option should never use ntlm
or ntlmi
when connecting to SMB Azure file shares. If you set global options in /etc/samba/smb.conf, ensure that you don't disable NTLMv2.
Cause 4: Storage account key access is disabled or disallowed via a policy
When storage account key access is disabled or disallowed for a storage account, SAS tokens and access keys won't work.
Use identity-based authentication instead. See Enable Active Directory authentication over SMB for Linux clients accessing Azure Files for prerequisites and instructions.
"Mount error(115): Operation now in progress" when you mount Azure Files by using SMB 3.x
Some Linux distributions don't yet support encryption features in SMB 3.x. Users might receive a "115" error message if they try to mount Azure Files by using SMB 3.x because of a missing feature. SMB 3.x with full encryption is supported only on the latest version of a Linux distro.
The encryption feature for SMB 3.x for Linux was introduced in the 4.11 kernel. This feature enables the mounting of an Azure file share from on-premises or a different Azure region. Some Linux distributions may have backported changes from the 4.11 kernel to older versions of the Linux kernel that they maintain. To help determine if your version of Linux supports SMB 3.x with encryption, consult with Use Azure Files with Linux.
If your Linux SMB client doesn't support encryption, mount Azure Files using SMB 2.1 from a Linux VM that's in the same Azure datacenter as the file share. Verify that the Secure transfer required setting is disabled on the storage account.
"Mount error(112): Host is down" because of a reconnection time-out
A "112" mount error occurs on the Linux client when the client has been idle for a long time. After an extended idle time, the client disconnects, and the connection times out.
The connection can be idle for the following reasons:
- Network communication failures that prevent re-establishing a TCP connection to the server when the default "soft" mount option is used.
- Recent reconnection fixes that aren't present in older kernels.
This reconnection problem in the Linux kernel is now fixed as part of the following changes:
However, these changes might not be ported yet to all Linux distributions. If you're using a popular Linux distribution, you can check Use Azure Files with Linux to see which version of your distribution has the necessary kernel changes.
You can work around this problem by specifying a hard mount. A hard mount forces the client to wait until a connection is established or until it's explicitly interrupted. You can use it to prevent errors because of network time-outs. However, this workaround might cause indefinite waits. Be prepared to stop connections as necessary.
If you can't upgrade to the latest kernel versions, you can work around this problem by keeping a file in the Azure file share that you write to every 30 seconds or less. This must be a write operation, such as rewriting the created or modified date on the file. Otherwise, you might get cached results, and your operation might not trigger the reconnection.