Azure – Error when trying to mount Azure File storage on a CentOS 7 machine

azuremountserver-message-block

Since the general availability of Azure File storage, the file storage can be connected from on-premise machines using SMB 3.0. When I tried to mount the file storage, it gives out a Permission Denied error, while I can use the file share with smbclient just fine.

[root@server mnt]# mount -t cifs -o credentials=/root/smb.pass,vers=
3.0,rw //allendisk.file.core.windows.net/allendisk file/
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Using smbclient, it can connect just fine.

[root@server mnt]# smbclient //allendisk.file.core.windows.net/allen
disk -mSMB3 -A /root/smb.pass
Domain=[X] OS=[] Server=[]
smb: \>

It is confusing that I can connect to the file share but not able to mount on it. My smbclient version is 4.1.12 and the cifs kernel module is 6.2.

Best Answer

You will need an SMB client that supports encryption. Have a look at this: https://azure.microsoft.com/en-us/blog/azure-file-storage-now-generally-available/

In that URL, it says:

Note that since the Linux SMB client doesn’t support encryption yet, mounting from Linux still requires the client to be in the same Azure region as the file share. However, encryption support for Linux is on the roadmap of Linux developers responsible for SMB functionality from the community. Linux distributions that support encryption in the future will be able to mount Azure File Storage from anywhere as well.