Skip to content

Commit b49d9a2

Browse files
Merge pull request #314830 from MaximeKjaer/patch-6
Reorganize ACLing docs for Portal and PowerShell ACLing support
2 parents 9d347fd + a24c664 commit b49d9a2

2 files changed

Lines changed: 51 additions & 46 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: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ 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+
| Azure portal | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: |
27+
| PowerShell (RestSetAcls module) | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: |
2328

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.
29+
To use Windows File Explorer or icacls, 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.
2530

26-
Before you can configure Windows ACLs, you need to mount the file share with admin-level access.
31+
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.
2732

2833
## How Azure RBAC and Windows ACLs work together
2934

@@ -74,7 +79,7 @@ For more information on these permissions, see the [command-line reference for i
7479

7580
## Mount the file share with admin-level access
7681

77-
Before you configure Windows ACLs, mount the file share with admin-level access. You can take two approaches:
82+
Before you configure Windows ACLs with File Explorer or icacls, mount the file share with admin-level access. If you will be configuring ACLs with Azure portal or the RestSetAcls PowerShell module, skip this section. You have two options for mounting with admin-level access.
7883

7984
- **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.
8085

@@ -134,7 +139,7 @@ The process for configuring Windows ACLs varies depending on whether you're auth
134139
135140
- 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.
136141
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.
142+
- For hybrid identities, you can configure Windows ACLs by using icacls, or you can use Windows File Explorer. If your storage account is configured for Entra Kerberos authentication, you can also use the Azure portal or RestSetAcls PowerShell.
138143
139144
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.
140145
@@ -143,45 +148,6 @@ The process for configuring Windows ACLs varies depending on whether you're auth
143148
>
144149
> 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.
145150
146-
### Configure Windows ACLs by using the Azure portal
147-
148-
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.
149-
150-
1. Sign in to the Azure portal by using this specific URL: [https://aka.ms/portal/fileperms](https://aka.ms/portal/fileperms).
151-
152-
1. Go to the file share where you want to configure Windows ACLs.
153-
154-
1. On the service menu, select **Browse**. If you want to set an ACL at the root folder, select **Manage access** from the top menu.
155-
156-
:::image type="content" source="media/configure-file-level-permissions/set-root-access.png" alt-text="Screenshot of the Azure portal that shows how to manage access for the root folder of a file share." lightbox="media/configure-file-level-permissions/set-root-access.png" border="true":::
157-
158-
1. To set an ACL for a file or directory, right-click the file or directory, and then select **Manage access**.
159-
160-
:::image type="content" source="media/configure-file-level-permissions/manage-access.png" alt-text="Screenshot of the Azure portal that shows how to set Windows ACLs for a file or directory." lightbox="media/configure-file-level-permissions/manage-access.png" border="true":::
161-
162-
1. The pane shows the available users and groups. You can optionally add a new user or group. Select the pencil icon at the far right of any user or group to add or edit permissions for the user or group to access the specified file or directory.
163-
164-
:::image type="content" source="media/configure-file-level-permissions/users-and-groups.png" alt-text="Screenshot of the Azure portal that shows a list of Entra users and groups." lightbox="media/configure-file-level-permissions/users-and-groups.png" border="true":::
165-
166-
1. Edit the permissions. **Deny** always takes precedence over **Allow** when both are set. When neither is set, default permissions are inherited.
167-
168-
:::image type="content" source="media/configure-file-level-permissions/edit-permissions.png" alt-text="Screenshot of the Azure portal that shows how to add or edit permissions for an Entra user or group." lightbox="media/configure-file-level-permissions/edit-permissions.png" border="true":::
169-
170-
1. Select **Save** to set the ACL.
171-
172-
### Configure Windows ACLs for cloud-only identities by using PowerShell
173-
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.
175-
176-
For example, if you want to set a root ACL that gives the cloud-only user `[email protected]` read access:
177-
178-
```powershell
179-
$AccountName = "<storage-account-name>" # replace with the storage account name
180-
$AccountKey = "<storage-account-key>" # replace with the storage account key
181-
$context = New-AzStorageContext -StorageAccountName $AccountName -StorageAccountKey $AccountKey
182-
Add-AzFileAce -Context $context -FileShareName test -FilePath "/" -Type Allow -Principal "[email protected]" -AccessRights Read,Synchronize -InheritanceFlags ObjectInherit,ContainerInherit
183-
```
184-
185151
### Configure Windows ACLs by using icacls
186152
187153
> [!IMPORTANT]
@@ -222,6 +188,45 @@ To configure ACLs by using Windows File Explorer, follow these steps:
222188
223189
1. Select **Apply**.
224190
191+
### Configure Windows ACLs by using the Azure portal
192+
193+
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.
194+
195+
1. Sign in to the [Azure portal](https://portal.azure.com/).
196+
197+
1. Go to the file share where you want to configure Windows ACLs.
198+
199+
1. On the service menu, select **Browse**. If you want to set an ACL at the root folder, select **Manage access** from the top menu.
200+
201+
:::image type="content" source="media/configure-file-level-permissions/set-root-access.png" alt-text="Screenshot of the Azure portal that shows how to manage access for the root folder of a file share." lightbox="media/configure-file-level-permissions/set-root-access.png" border="true":::
202+
203+
1. To set an ACL for a file or directory, right-click the file or directory, and then select **Manage access**.
204+
205+
:::image type="content" source="media/configure-file-level-permissions/manage-access.png" alt-text="Screenshot of the Azure portal that shows how to set Windows ACLs for a file or directory." lightbox="media/configure-file-level-permissions/manage-access.png" border="true":::
206+
207+
1. The pane shows the available users and groups. You can optionally add a new user or group. Select the pencil icon at the far right of any user or group to add or edit permissions for the user or group to access the specified file or directory.
208+
209+
:::image type="content" source="media/configure-file-level-permissions/users-and-groups.png" alt-text="Screenshot of the Azure portal that shows a list of Entra users and groups." lightbox="media/configure-file-level-permissions/users-and-groups.png" border="true":::
210+
211+
1. Edit the permissions. **Deny** always takes precedence over **Allow** when both are set. When neither is set, default permissions are inherited.
212+
213+
:::image type="content" source="media/configure-file-level-permissions/edit-permissions.png" alt-text="Screenshot of the Azure portal that shows how to add or edit permissions for an Entra user or group." lightbox="media/configure-file-level-permissions/edit-permissions.png" border="true":::
214+
215+
1. Select **Save** to set the ACL.
216+
217+
### Configure Windows ACLs for cloud-only identities by using PowerShell
218+
219+
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.
220+
221+
For example, if you want to set a root ACL that gives the cloud-only user `[email protected]` read access:
222+
223+
```powershell
224+
$AccountName = "<storage-account-name>" # replace with the storage account name
225+
$AccountKey = "<storage-account-key>" # replace with the storage account key
226+
$context = New-AzStorageContext -StorageAccountName $AccountName -StorageAccountKey $AccountKey
227+
Add-AzFileAce -Context $context -FileShareName test -FilePath "/" -Type Allow -Principal "[email protected]" -AccessRights Read,Synchronize -InheritanceFlags ObjectInherit,ContainerInherit
228+
```
229+
225230
## Next step
226231

227232
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)