Skip to content

Commit 7e3d81b

Browse files
authored
Reorganize ACLing docs for Portal and PowerShell
1 parent 9b4bb73 commit 7e3d81b

2 files changed

Lines changed: 69 additions & 61 deletions

File tree

articles/storage/files/storage-files-identity-auth-hybrid-identities-enable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ To set share-level permissions, follow the instructions in [Assign share-level p
207207

208208
## Configure directory and file-level permissions
209209

210-
Once share-level permissions are in place, you can assign Windows ACLs (directory and file-level permissions) to the user or group. **For hybrid identities, this assignment requires using a device with unimpeded network connectivity to an Active Directory**.
210+
Once share-level permissions are in place, you can assign Windows ACLs (directory and file-level permissions) to the user or group. **For hybrid identities, if using icacls or File Explorer, this assignment requires using a device with unimpeded network connectivity to an Active Directory**.
211211

212212
To configure directory and file-level permissions, follow the instructions in [Configure directory and file-level permissions over SMB](storage-files-identity-configure-file-level-permissions.md).
213213

articles/storage/files/storage-files-identity-configure-file-level-permissions.md

Lines changed: 68 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ Before you can configure directory-level and file-level permissions, you must [a
1717

1818
## Prerequisites
1919

20-
If you want to configure Windows ACLs for [hybrid identities](/entra/identity/hybrid/whatis-hybrid-identity) and the identity source for your storage account is Active Directory Domain Services (AD DS) or Microsoft Entra Kerberos, you need a client machine running Windows that has unimpeded network connectivity to on-premises Active Directory.
20+
Consult the following table to determine which tool can be used for which authentication type.
2121

22-
If the identity source for your storage account is Microsoft Entra Domain Services, you need a client machine running Windows that has unimpeded network connectivity to the domain controllers for the domain that Microsoft Entra Domain Services manages. These domain controllers are located in Azure.
22+
| Tool | AD DS (Hybrid) | Entra Domain Services (Hybrid) | Entra Kerberos (Hybrid) | Entra Kerberos (Cloud-only, preview) |
23+
|---------------------------------|:------------------------:|:------------------------------:|:------------------------:|:------------------------------------:|
24+
| Windows File Explorer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |
25+
| icacls | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |
26+
| PowerShell (Set-ACL) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |
27+
| Azure portal | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: |
28+
| PowerShell (RestSetAcls module) | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: |
2329

24-
If your identity source is Microsoft Entra Kerberos and you want to configure Windows ACLs for cloud-only identities (preview), there's no dependency on domain controllers, but the client device must be joined to Microsoft Entra ID.
30+
To use Windows File Explorer, icacls or PowerShell (Set-Acl), you need a client machine running Windows. You will also need to mount the file share with admin-level access. If the identity source for your storage account is Active Directory Domain Services (AD DS) or Microsoft Entra Kerberos, this machine must have unimpeded network connectivity to an on-premises Active Directory. If the identity source is Microsoft Entra Domain Services, the machine must have unimpeded network connectivity to the domain controllers for the domain that Microsoft Entra Domain Services manages; these domain controllers are located in Azure.
2531

26-
Before you can configure Windows ACLs, you need to mount the file share with admin-level access.
32+
To use the Azure portal or the PowerShell RestSetAcls module, there's no dependency on domain controllers. However, the identities must be hybrid or cloud-native (preview). For RestSetAcls, you need a client machine running Windows.
2733

2834
## How Azure RBAC and Windows ACLs work together
2935

@@ -72,17 +78,34 @@ The root directory of a file share includes the following permissions:
7278

7379
For more information on these permissions, see the [command-line reference for icacls](/windows-server/administration/windows-commands/icacls).
7480

75-
## Mount the file share with admin-level access
81+
## Configure Windows ACLs
82+
83+
The process for configuring Windows ACLs varies depending on whether you're authenticating hybrid or cloud-only identities:
84+
85+
- For cloud-only identities (preview), you must use the Azure portal or PowerShell. Windows File Explorer and icacls aren't currently supported for cloud-only identities.
86+
87+
- For hybrid identities, you can configure Windows ACLs by using icacls, or you can use Windows File Explorer. You can also use the [Set-ACL](/powershell/module/microsoft.powershell.security/set-acl) PowerShell command.
7688

77-
Before you configure Windows ACLs, mount the file share with admin-level access. You can take two approaches:
89+
If you have directories or files in on-premises file servers with Windows ACLs configured against the AD DS identities, you can copy them over to Azure Files while preserving the ACLs by using traditional file copy tools like Robocopy or the latest version of [Azure AzCopy](https://github.com/Azure/azure-storage-azcopy/releases). If you tier directories and files to Azure Files through Azure File Sync, your ACLs are carried over and persisted in their native format.
90+
91+
> [!IMPORTANT]
92+
> If you're using Microsoft Entra Kerberos to authenticate hybrid identities, the hybrid identities must be synced to Microsoft Entra ID for ACLs to be enforced.
93+
>
94+
> You can set file-level and directory-level ACLs for identities that aren't synced to Microsoft Entra ID. However, these ACLs aren't enforced because the Kerberos ticket used for authentication and authorization doesn't contain the not-synced identities. If you're using on-premises AD DS as your identity source, you can include not-synced identities in the ACLs. AD DS puts those security identifiers (SIDs) in the Kerberos ticket, and ACLs are enforced.
95+
96+
## Configure Windows ACLs with Windows File Explorer or icacls
97+
98+
### Mount the file share with admin-level access
99+
100+
Before you configure Windows ACLs with File Explorer or icacls, mount the file share with admin-level access. You can take two approaches:
78101

79102
- **Use the Windows permission model for SMB admin (recommended)**: Assign the built-in RBAC role [Storage File Data SMB Admin](/azure/role-based-access-control/built-in-roles/storage#storage-file-data-smb-admin) to admin users who will configure ACLs. Then mount the file share by using [identity-based authentication](storage-files-active-directory-overview.md) and configure ACLs. If an existing ACL on a file or directory denies the admin access, the admin can use the Windows `takeown` command to take ownership of the file or directory and then modify the ACL. This approach is more secure because it doesn't require your storage account key to mount the file share.
80103

81104
- **Use the storage account key (less secure)**: Use your storage account key to mount the file share and then configure ACLs. Mounting with a storage account key gives you immediate full access without needing to take ownership of files or directories. The storage account key is a sensitive credential. For security reasons, use this option only if you can't use identity-based authentication.
82105

83106
If a user has the Full Control ACL and the [Storage File Data SMB Share Elevated Contributor](/azure/role-based-access-control/built-in-roles/storage#storage-file-data-smb-share-elevated-contributor) role (or a custom role with the required permissions), they can configure ACLs without using the Windows permission model for SMB admin or the storage account key.
84107

85-
### Use the Windows permission model for SMB admin
108+
#### Use the Windows permission model for SMB admin
86109

87110
Use the Windows permission model for SMB admin instead of the storage account key. This feature enables you to assign the built-in RBAC role [Storage File Data SMB Admin](/azure/role-based-access-control/built-in-roles/storage#storage-file-data-smb-admin) to admin users, so they can mount the share using identity-based authentication and configure ACLs.
88111

@@ -113,7 +136,7 @@ To use the Windows permission model for SMB admin, follow these steps:
113136
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName>
114137
```
115138
116-
### Mount the file share by using your storage account key (not recommended)
139+
#### Mount the file share by using your storage account key (not recommended)
117140
118141
> [!WARNING]
119142
> If possible, use the [Windows permission model for SMB admin](#use-the-windows-permission-model-for-smb-admin) to mount the share instead of using the storage account key.
@@ -128,26 +151,51 @@ Use the `net use` command to mount the share at this stage and not PowerShell. I
128151
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName> /user:localhost\<YourStorageAccountName> <YourStorageAccountKey>
129152
```
130153
131-
## Configure Windows ACLs
154+
### Configure Windows ACLs by using icacls
132155
133-
The process for configuring Windows ACLs varies depending on whether you're authenticating hybrid or cloud-only identities:
156+
> [!IMPORTANT]
157+
> Using icacls doesn't work for cloud-only identities.
134158
135-
- For cloud-only identities (preview), you must use the Azure portal or PowerShell. Windows File Explorer and icacls aren't currently supported for cloud-only identities.
159+
To grant full permissions to all directories and files under the file share, including the root directory, run the following Windows command from a machine that has unimpeded network connectivity to the Active Directory domain controller. Remember to replace the placeholder values in the example with your own values. If your identity source is Microsoft Entra Domain Services, then `<user-upn>` is `<user-email>`.
136160
137-
- For hybrid identities, you can configure Windows ACLs by using icacls, or you can use Windows File Explorer. You can also use the [Set-ACL](/powershell/module/microsoft.powershell.security/set-acl) PowerShell command.
161+
```
162+
icacls <mapped-drive-letter>: /grant <user-upn>:(f)
163+
```
138164
139-
If you have directories or files in on-premises file servers with Windows ACLs configured against the AD DS identities, you can copy them over to Azure Files while preserving the ACLs by using traditional file copy tools like Robocopy or the latest version of [Azure AzCopy](https://github.com/Azure/azure-storage-azcopy/releases). If you tier directories and files to Azure Files through Azure File Sync, your ACLs are carried over and persisted in their native format.
165+
For more information on how to use icacls to set Windows ACLs and on the types of supported permissions, see [the command-line reference for icacls](/windows-server/administration/windows-commands/icacls).
166+
167+
### Configure Windows ACLs by using Windows File Explorer
168+
169+
If you sign in to a domain-joined Windows client, you can use Windows File Explorer to grant full permission to all directories and files under the file share, including the root directory. Using File Explorer works only for hybrid identities.
140170
141171
> [!IMPORTANT]
142-
> If you're using Microsoft Entra Kerberos to authenticate hybrid identities, the hybrid identities must be synced to Microsoft Entra ID for ACLs to be enforced.
143-
>
144-
> You can set file-level and directory-level ACLs for identities that aren't synced to Microsoft Entra ID. However, these ACLs aren't enforced because the Kerberos ticket used for authentication and authorization doesn't contain the not-synced identities. If you're using on-premises AD DS as your identity source, you can include not-synced identities in the ACLs. AD DS puts those security identifiers (SIDs) in the Kerberos ticket, and ACLs are enforced.
172+
> Using Windows File Explorer doesn't work for cloud-only identities. If your client isn't domain joined, or if your environment has multiple Active Directory forests, don't use File Explorer to configure ACLs. [Use icacls](#configure-windows-acls-by-using-icacls) instead. This restriction exists because Windows File Explorer ACL configuration requires the client to be domain joined to the Active Directory domain that the storage account is joined to.
145173
146-
### Configure Windows ACLs by using the Azure portal
174+
To configure ACLs by using Windows File Explorer, follow these steps:
175+
176+
1. Open Windows File Explorer, right-click the file or directory, and then select **Properties**.
177+
178+
1. Select the **Security** tab.
179+
180+
1. Select **Edit** to change permissions.
181+
182+
1. Change the permissions of existing users, or select **Add** to grant permissions to new users.
183+
184+
1. In the prompt window for adding new users, enter the target username that you want to grant permissions to in the **Enter the object names to select** box. To find the full user principal name (UPN) of the target user, select **Check Names**.
185+
186+
You might need to specify domain name and domain GUID for your on-premises Active Directory deployment. You can get this information from your domain admin or from an on-premises Active Directory-joined client.
187+
188+
1. Select **OK**.
189+
190+
1. On the **Security** tab, select all permissions you want to grant your new user.
191+
192+
1. Select **Apply**.
193+
194+
## Configure Windows ACLs by using the Azure portal
147195
148196
If you configure Entra Kerberos as your identity source, you can configure Windows ACLs for each Entra user or group by using the Azure portal. This method works for both hybrid and cloud-only identities only when Entra Kerberos is used as the identity source.
149197
150-
1. Sign in to the Azure portal by using this specific URL: [https://aka.ms/portal/fileperms](https://aka.ms/portal/fileperms).
198+
1. Sign in to the [Azure portal](https://portal.azure.com/).
151199
152200
1. Go to the file share where you want to configure Windows ACLs.
153201
@@ -169,9 +217,9 @@ If you configure Entra Kerberos as your identity source, you can configure Windo
169217
170218
1. Select **Save** to set the ACL.
171219
172-
### Configure Windows ACLs for cloud-only identities by using PowerShell
220+
## Configure Windows ACLs for cloud-only identities by using PowerShell
173221
174-
If you need to assign ACLs in bulk to cloud-only users, use the [RestSetAcls PowerShell module](https://www.powershellgallery.com/packages/RestSetAcls/) to automate the process by using the Azure Files REST API.
222+
If you need to assign ACLs in bulk to cloud-only users, use the [RestSetAcls PowerShell module](https://www.powershellgallery.com/packages/RestSetAcls/) to automate the process by using the Azure Files REST API. This module does not require network connectivity to Active Directory.
175223
176224
For example, if you want to set a root ACL that gives the cloud-only user `[email protected]` read access:
177225
@@ -182,46 +230,6 @@ $context = New-AzStorageContext -StorageAccountName $AccountName -StorageAccount
182230
Add-AzFileAce -Context $context -FileShareName test -FilePath "/" -Type Allow -Principal "[email protected]" -AccessRights Read,Synchronize -InheritanceFlags ObjectInherit,ContainerInherit
183231
```
184232

185-
### Configure Windows ACLs by using icacls
186-
187-
> [!IMPORTANT]
188-
> Using icacls doesn't work for cloud-only identities.
189-
190-
To grant full permissions to all directories and files under the file share, including the root directory, run the following Windows command from a machine that has unimpeded network connectivity to the Active Directory domain controller. Remember to replace the placeholder values in the example with your own values. If your identity source is Microsoft Entra Domain Services, then `<user-upn>` is `<user-email>`.
191-
192-
```
193-
icacls <mapped-drive-letter>: /grant <user-upn>:(f)
194-
```
195-
196-
For more information on how to use icacls to set Windows ACLs and on the types of supported permissions, see [the command-line reference for icacls](/windows-server/administration/windows-commands/icacls).
197-
198-
### Configure Windows ACLs by using Windows File Explorer
199-
200-
If you sign in to a domain-joined Windows client, you can use Windows File Explorer to grant full permission to all directories and files under the file share, including the root directory. Using File Explorer works only for hybrid identities.
201-
202-
> [!IMPORTANT]
203-
> Using Windows File Explorer doesn't work for cloud-only identities. If your client isn't domain joined, or if your environment has multiple Active Directory forests, don't use File Explorer to configure ACLs. [Use icacls](#configure-windows-acls-by-using-icacls) instead. This restriction exists because Windows File Explorer ACL configuration requires the client to be domain joined to the Active Directory domain that the storage account is joined to.
204-
205-
To configure ACLs by using Windows File Explorer, follow these steps:
206-
207-
1. Open Windows File Explorer, right-click the file or directory, and then select **Properties**.
208-
209-
1. Select the **Security** tab.
210-
211-
1. Select **Edit** to change permissions.
212-
213-
1. Change the permissions of existing users, or select **Add** to grant permissions to new users.
214-
215-
1. In the prompt window for adding new users, enter the target username that you want to grant permissions to in the **Enter the object names to select** box. To find the full user principal name (UPN) of the target user, select **Check Names**.
216-
217-
You might need to specify domain name and domain GUID for your on-premises Active Directory deployment. You can get this information from your domain admin or from an on-premises Active Directory-joined client.
218-
219-
1. Select **OK**.
220-
221-
1. On the **Security** tab, select all permissions you want to grant your new user.
222-
223-
1. Select **Apply**.
224-
225233
## Next step
226234

227235
After you configure directory-level and file-level permissions, you can mount the SMB file share on [Windows](storage-how-to-use-files-windows.md) or [Linux](storage-how-to-use-files-linux.md).

0 commit comments

Comments
 (0)