You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/files/storage-files-identity-ad-ds-configure-permissions.md
+16-23Lines changed: 16 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
2
title: Control what a user can do at the file level - Azure file shares
3
-
description: Learn how to configure Windows ACLs permissions for on-premises AD DS authentication to Azure file shares. Allowing you to take advantage of granular access control.
3
+
description: Learn how to configure Windows ACLs permissions for on-premises AD DS authentication to Azure file shares, allowing you to take advantage of granular access control.
4
4
author: khdownie
5
5
ms.service: storage
6
6
ms.subservice: files
7
7
ms.topic: how-to
8
-
ms.date: 03/16/2022
8
+
ms.date: 09/26/2022
9
9
ms.author: kendownie
10
10
---
11
11
12
12
# Part three: configure directory and file level permissions over SMB
13
13
14
14
Before you begin this article, make sure you completed the previous article, [Assign share-level permissions to an identity](storage-files-identity-ad-ds-assign-permissions.md) to ensure that your share-level permissions are in place.
15
15
16
-
After you assign share-level permissions with Azure RBAC, you must configure proper Windows ACLs at the root, directory, or file level, to take advantage of granular access control. The Azure RBAC share-level permissions act as a high-level gatekeeper that determines whether a user can access the share. While the Windows ACLs operate at a more granular level to control what operations the user can do at the directory or file level. Both share-level and file/directory level permissions are enforced when a user attempts to access a file/directory, so if there is a difference between either of them, only the most restrictive one will be applied. For example, if a user has read/write access at the file-level, but only read at a share-level, then they can only read that file. The same would be true if it was reversed, and a user had read/write access at the share-level, but only read at the file-level, they can still only read the file.
16
+
After you assign share-level permissions with Azure role-based access control (RBAC), you must configure proper Windows ACLs at the root, directory, or file level, to take advantage of granular access control. The Azure RBAC share-level permissions act as a high-level gatekeeper that determines whether a user can access the share, while the Windows access control lists (ACLs) operate at a more granular level to control what operations the user can do at the directory or file level. Both share-level and file/directory level permissions are enforced when a user attempts to access a file/directory, so if there's a difference between either of them, only the most restrictive one will be applied. For example, if a user has read/write access at the filelevel, but only read at a sharelevel, then they can only read that file. The same would be true if it was reversed: if a user had read/write access at the share-level, but only read at the file-level, they can still only read the file.
17
17
18
18
19
19
## Applies to
@@ -27,7 +27,6 @@ After you assign share-level permissions with Azure RBAC, you must configure pro
27
27
28
28
The following table contains the Azure RBAC permissions related to this configuration:
29
29
30
-
31
30
| Built-in role | NTFS permission | Resulting access |
32
31
|---------|---------|---------|
33
32
|Storage File Data SMB Share Reader | Full control, Modify, Read, Write, Execute | Read & execute |
@@ -43,8 +42,6 @@ The following table contains the Azure RBAC permissions related to this configur
43
42
|| Read | Read |
44
43
|| Write | Write |
45
44
46
-
47
-
48
45
## Supported permissions
49
46
50
47
Azure Files supports the full set of basic and advanced Windows ACLs. You can view and configure Windows ACLs on directories and files in an Azure file share by mounting the share and then using Windows File Explorer, running the Windows [icacls](/windows-server/administration/windows-commands/icacls) command, or the [Set-ACL](/powershell/module/microsoft.powershell.security/set-acl) command.
@@ -69,25 +66,22 @@ The following permissions are included on the root directory of a file share:
69
66
|`NT AUTHORITY\Authenticated Users`|All users in AD that can get a valid Kerberos token.|
70
67
|`CREATOR OWNER`|Each object either directory or file has an owner for that object. If there are ACLs assigned to `CREATOR OWNER` on that object, then the user that is the owner of this object has the permissions to the object defined by the ACL.|
71
68
72
-
73
69
## Mount a file share from the command prompt
74
70
75
-
Use the Windows `net use` command to mount the Azure file share. Remember to replace the placeholder values in the following example with your own values. For more information about mounting file shares, see [Use an Azure file share with Windows](storage-how-to-use-files-windows.md).
71
+
Use the PowerShell script below to mount the Azure file share. Remember to replace the placeholder values in the following example with your own values. For more information about mounting file shares, see [Use an Azure file share with Windows](storage-how-to-use-files-windows.md).
76
72
77
73
> [!NOTE]
78
-
> You may see the *Full Control** ACL applied to a role already. This typically already offers the ability to assign permissions. However, because there are access checks at two levels (the share-level and the file-level), this is restricted. Only users who have the **SMB Elevated Contributor** role and create a new file or folder can assign permissions on those specific new files or folders without the use of the storage account key. All other permission assignment requires mounting the share with the storage account key, first.
74
+
> You may see the *Full Control** ACL applied to a role already. This typically already offers the ability to assign permissions. However, because there are access checks at two levels (the sharelevel and the filelevel), this is restricted. Only users who have the **SMB Elevated Contributor** role and create a new file or folder can assign permissions on those specific new files or folders without the use of the storage account key. All other permission assignment requires mounting the share with the storage account key first.
net use <desired-drive-letter>: \\<storage-account-name>.file.core.windows.net\<share-name> /user:Azure\<storage-account-name> <storage-account-key>
85
-
}
86
-
else
87
-
{
88
-
Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\<storage-account-name>.file.core.windows.net\data"
81
+
} else {
82
+
Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not
83
+
blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
89
84
}
90
-
91
85
```
92
86
93
87
If you experience issues in connecting to Azure Files, refer to [the troubleshooting tool we published for Azure Files mounting errors on Windows](https://azure.microsoft.com/blog/new-troubleshooting-diagnostics-for-azure-files-mounting-errors-on-windows/).
@@ -110,20 +104,19 @@ For more information on how to use icacls to set Windows ACLs and on the differe
110
104
111
105
### Configure Windows ACLs with Windows File Explorer
112
106
113
-
Use Windows File Explorer to grant full permission to all directories and files under the file share, including the root directory. If you are not able to load the AD domain information correctly in Windows File Explorer, this is likely due to trust configuration in your on-prem AD environment. The client machine was not able to reach the AD domain controller registered for Azure Files authentication. In this case, use icacls for configurating Windows ACLs.
107
+
Use Windows File Explorer to grant full permission to all directories and files under the file share, including the root directory. If you are not able to load the AD domain information correctly in Windows File Explorer, this is likely due to trust configuration in your on-premises AD environment. The client machine was not able to reach the AD domain controller registered for Azure Files authentication. In this case, use icacls for configuring Windows ACLs.
114
108
115
109
1. Open Windows File Explorer and right click on the file/directory and select **Properties**.
116
110
1. Select the **Security** tab.
117
111
1. Select **Edit..** to change permissions.
118
112
1. You can change the permissions of existing users or select **Add...** to grant permissions to new users.
119
113
1. In the prompt window for adding new users, enter the target username you want to grant permissions to in the **Enter the object names to select** box, and select **Check Names** to find the full UPN name of the target user.
120
-
1. Select **OK**.
121
-
1. In the **Security** tab, select all permissions you want to grant your new user.
122
-
1. Select **Apply**.
123
-
114
+
1. Select **OK**.
115
+
1. In the **Security** tab, select all permissions you want to grant your new user.
116
+
1. Select **Apply**.
124
117
125
118
## Next steps
126
119
127
-
Now that the feature is enabled and configured, continue to the next article, where you mount your Azure file share from a domain-joined VM.
120
+
Now that the feature is enabled and configured, continue to the next article to learn how to mount your Azure file share from a domain-joined VM.
128
121
129
122
[Part four: mount a file share from a domain-joined VM](storage-files-identity-ad-ds-mount-file-share.md)
0 commit comments