0

I have two Linux Azure VMs (Redhat 7.4) that need share a common location for processing files. The VMs are located in Australia East.

I also have a Storage Account that's in Australia East and have created a file share in the Storage Account. I generated the commands to connect the VMs to the file share (by clicking on the file share, then choosing "Connect"), but I get this error when I run the final generated command in the VM:

sudo mount -t cifs //<storageaccount>/<fileshare> /mnt/<storageaccount>/<fileshare> -o vers=3.0,credentials=/etc/smbcredentials/<storageaccount>.cred,dir_mode=0777,file_mode=0777,serverino

... I get this message:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I've run the file diagnostic tool script (https://gallery.technet.microsoft.com/Troubleshooting-tool-for-02184089) in the VM and got this error:

Error: Client is not Azure VM in the region as Storage account, mount will fail

I'm confused as it seems to be saying that the VMs and Storage Account are in different locations, when they aren't.

Thanks in advance for any assistance.

GarlicBread
  • 1,671
  • 8
  • 26
  • 49
  • Is the VM Ubuntu that supports SMB 3.0? https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux – Nancy Jan 08 '20 at 01:46
  • It doesn't, but it supports SMB 2.1. As such, I've tried switching off secure transfer (https://learn.microsoft.com/en-us/azure/storage/common/storage-require-secure-transfer?toc=%2fazure%2fstorage%2ffiles%2ftoc.json), but get the same error message. – GarlicBread Jan 08 '20 at 01:57
  • I don't think the region is the limit. The error seems you do not have permission. Which user do you use and how do you connect to the VM? – Charles Xu Jan 08 '20 at 02:00
  • I'm using an admin user in the Linux VM. I get there via a terminal session. – GarlicBread Jan 08 '20 at 02:04
  • Can you provide the screenshot of what you did and the error your got? – Charles Xu Jan 08 '20 at 02:16
  • Command: sudo mount -t cifs /// /mnt// -o vers=3.0,credentials=/etc/smbcredentials/.cred,dir_mode=0777,file_mode=0777,serverino Message: mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) – GarlicBread Jan 08 '20 at 02:31
  • Try to use`sudo mount -t cifs /// /mnt// -o vers=2.1,credentials=/etc/smbcredentials/.cred,dir_mode=0777,file_mode=0777,serverino` note the version, it should be 2.1 – Nancy Jan 08 '20 at 02:34
  • Do you mind provide the whole string between the "cifs" and the mount path? I suspect you use the wrong URL. – Charles Xu Jan 08 '20 at 02:37
  • Ah - well spotted. Amended to "vers=2.1", got exactly the same error message unfortunately: mount error(13): Permission denied – GarlicBread Jan 08 '20 at 02:37
  • Try the solution in this link, https://learn.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-linux-file-connection-problems#mount-error13-permission-denied-when-you-mount-an-azure-file-share – Nancy Jan 08 '20 at 02:42
  • @GarlicBread - please edit your question to include the additional details you provided in comments (especially the command you ran). Unformatted commands and code are very difficult to read, especially when buried in comments. – David Makogon Jan 08 '20 at 04:41
  • @GarlicBread - that said: This question should be posted to ServerFault, not Stack Overflow. – David Makogon Jan 08 '20 at 04:41

1 Answers1

1

I can reproduce this same issue with Redhat 7.4. To fix this, you can make sure that Secure transfer required setting is disabled on the storage account. View more info. Or verify that you input the correct value in each of the parameters in the commands. You could refer to these steps to mount the Azure file share.

sudo mount -t cifs $smbPath $mntPath -o vers=3.0,username=$storageAccountName,password=$storageAccountKey,serverino

enter image description here

Nancy
  • 26,865
  • 3
  • 18
  • 34