Skip to content

Commit 54a1790

Browse files
Merge pull request #293585 from khdownie/kendownie012425-2
Unix style perms support
2 parents 0314a96 + 4b54c6e commit 54a1790

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

articles/storage/files/storage-how-to-use-files-linux.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ author: khdownie
55
ms.service: azure-file-storage
66
ms.custom: linux-related-content, devx-track-azurecli
77
ms.topic: how-to
8-
ms.date: 01/24/2025
8+
ms.date: 02/21/2025
99
ms.author: kendownie
1010
---
1111

1212
# Mount SMB Azure file shares on Linux clients
1313

1414
Azure file shares can be mounted in Linux distributions using the [SMB kernel client](https://wiki.samba.org/index.php/LinuxCIFS).
1515

16+
## Applies to
17+
18+
| File share type | SMB | NFS |
19+
|-|:-:|:-:|
20+
| Standard file shares (GPv2), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
21+
| Standard file shares (GPv2), GRS/GZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
22+
| Premium file shares (FileStorage), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
23+
24+
## Protocols
25+
1626
The recommended way to mount an Azure file share on Linux is using SMB 3.1.1. By default, Azure Files requires encryption in transit, which is supported by SMB 3.0+. Azure Files also supports SMB 2.1, which doesn't support encryption in transit, but you can't mount Azure file shares with SMB 2.1 from another Azure region or on-premises for security reasons. Unless your application specifically requires SMB 2.1, use SMB 3.1.1. SMB 2.1 support was added to Linux kernel version 3.7, so if you're using a version of the Linux kernel after 3.7, it should support SMB 2.1.
1727

1828
| Distribution | SMB 3.1.1 (Recommended) | SMB 3.0 |
@@ -29,17 +39,6 @@ If your Linux distribution isn't listed in the above table, you can check the Li
2939
uname -r
3040
```
3141

32-
> [!NOTE]
33-
> All mounting scripts in this article will mount SMB file shares using the default 0755 Linux file and folder permissions. This means read, write, and execute for the file/directory owner, read and execute for users in the owner group, and read and execute for other users. Depending on your organization's security policies, you might want to set alternate `uid`/`gid` or `dir_mode` and `file_mode` permissions in the mount options. For more information on how to set permissions, see [UNIX numeric notation](https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation). See [mount options](#mount-options) for a list of mount options.
34-
35-
## Applies to
36-
37-
| File share type | SMB | NFS |
38-
|-|:-:|:-:|
39-
| Standard file shares (GPv2), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
40-
| Standard file shares (GPv2), GRS/GZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
41-
| Premium file shares (FileStorage), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
42-
4342
## Prerequisites
4443

4544
<a id="smb-client-reqs"></a>
@@ -109,6 +108,12 @@ On other distributions, use the appropriate package manager or [compile from sou
109108

110109
If you're unable to open up port 445 on your corporate network or are blocked from doing so by an ISP, you may use a VPN connection or ExpressRoute to work around port 445. For more information, see [Networking considerations for direct Azure file share access](storage-files-networking-overview.md).
111110
111+
## Permissions
112+
113+
All mounting scripts in this article will mount the file shares using the default 0755 Linux file and folder permissions. This means read, write, and execute for the file/directory owner, read and execute for users in the owner group, and read and execute for other users. Depending on your organization's security policies, you might want to set alternate `uid`/`gid` or `dir_mode` and `file_mode` permissions in the mount options.
114+
115+
For more information on how to set permissions, see [Unix symbolic notation](https://en.wikipedia.org/wiki/File-system_permissions#Symbolic_notation). See [mount options](#mount-options) for a list of mount options.
116+
112117
## Mount the Azure file share on-demand with mount
113118

114119
When you mount a file share on a Linux OS, your remote file share is represented as a folder in your local file system. You can mount file shares to anywhere on your system. The following example mounts under the `/media` path. You can change this to your preferred path you want by modifying the `$MNT_ROOT` variable.

0 commit comments

Comments
 (0)