Quick How to: Mount Azure Files Shares with Symlinks support on Ubuntu

Update Oct 2018: To see how to use this in Kuberentes check out this blog post by Daniele Maggio

By default mounting Azure File Shares on linux using CIFS doesn’t enable support for symlinks. You’ll see an error link this:

auser@acomputer:/media/shared$ ln -s linked -n t
ln: failed to create symbolic link 't': Operation not supported

So how do you fix this, simple? Simple add the following to the end of your CIFS mount command:

,mfsymlinks

So the command will look something like:

sudo mount -t cifs //<your-storage-acc-name>.file.core.windows.net/<storage-file-share-name> /media/shared -o vers=3.0,username=<storage-account-name>,password='<storage-account-key>',dir_mode=0777,file_mode=0777,mfsymlinks

So what does this do? Well you have to thank Steve French and Conrad Minshal. They defined a format for storing symlinks on SMB shares, an explanation of the format can be found here.

Thanks to renash for her comment (scroll to the bottom) which enabled me to find this, blog is to help others and give more details.

By:


One response to “Quick How to: Mount Azure Files Shares with Symlinks support on Ubuntu”

Leave a comment

Blog at WordPress.com.