-->
Azure Files supports identity-based authentication over Server Message Block (SMB) through on-premises Active Directory Domain Services (AD DS) and Azure Active Directory Domain Services (Azure AD DS). This article focuses on how Azure file shares can use domain services, either on-premises or in Azure, to support identity-based access to Azure file shares over SMB. Enabling identity-based access for your Azure file shares allows you to replace existing file servers with Azure file shares without replacing your existing directory service, maintaining seamless user access to shares.
- Sep 09, 2010 I set permissions for my 'Files' folder within my 'Home' folder as: Me - read & write everyone - no access But files and folders inside my 'Files' folder do not inherit permissions. They get permission attributes like: Me - read & write staff - read only or wheel - read only everyone - read only By the way what is 'staff' and 'wheel'?
- May 12, 2020 RELATED: How macOS Catalina's New Security Features Work. Setting File Permissions. To set file permissions, you’ll use the chmodcommand at the terminal. To remove all existing permissions, set read and write access for the user while allowing read access for all other users, type: chmod u=rw,g=r,o=r file.txt.
Exchange ActiveSync clients. Organizations can only select Exchange ActiveSync clients when assigning policy to users or groups. Selecting All users, All guest and external users, or Directory roles will cause all users to become blocked.; When creating a policy assigned to Exchange ActiveSync clients, Office 365 Exchange Online should be the only cloud application assigned to the policy. Oct 10, 2018 For example, apps with the notification permission can send you notifications, while apps with the radios permission can turn radios like your Bluetooth radio on and off. When an app wants to use a permission for the first time, it will pop up a request message, and you can allow or deny the permission at that time.
Azure Files enforces authorization on user access to both the share and the directory/file levels. Share-level permission assignment can be performed on Azure Active Directory (Azure AD) users or groups managed through the role-based access control (RBAC) model. With RBAC, the credentials you use for file access should be available or synced to Azure AD. You can assign built-in RBAC roles like Storage File Data SMB Share Reader to users or groups in Azure AD to grant read access to an Azure file share.
At the directory/file level, Azure Files supports preserving, inheriting, and enforcing Windows DACLs just like any Windows file servers. You can choose to keep Windows DACLs when copying data over SMB between your existing file share and your Azure file shares. Whether you plan to enforce authorization or not, you can use Azure file shares to back up ACLs along with your data.
For an overview of Azure AD authentication over SMB for Azure file shares, see Overview of Azure Active Directory authentication over SMB for Azure Files. This article is focused on how to enable authentication with Azure Active Directory Domain Services (Azure AD DS) on Azure Files.
Note
Azure Files supports Kerberos authentication with Azure AD DS with RC4-HMAC encryption. AES Kerberos encryption is not yet supported.Azure Files supports authentication for Azure AD DS with full synchronization with Azure AD. If you have enabled scoped synchronization in Azure AD DS which only sync a limited set of identities from Azure AD, authentication and authorization is not supported.
Prerequisites
Before you enable Azure AD over SMB for Azure file shares, make sure you have completed the following prerequisites:
- Select or create an Azure AD tenant.You can use a new or existing tenant for Azure AD authentication over SMB. The tenant and the file share that you want to access must be associated with the same subscription.To create a new Azure AD tenant, you can Add an Azure AD tenant and an Azure AD subscription. If you have an existing Azure AD tenant but want to create a new tenant for use with Azure file shares, see Create an Azure Active Directory tenant.
- Enable Azure AD Domain Services on the Azure AD tenant.To support authentication with Azure AD credentials, you must enable Azure AD Domain Services for your Azure AD tenant. If you aren't the administrator of the Azure AD tenant, contact the administrator and follow the step-by-step guidance to Enable Azure Active Directory Domain Services using the Azure portal.It typically takes about 15 minutes for an Azure AD DS deployment to complete. Verify that the health status of Azure AD DS shows Running, with password hash synchronization enabled, before proceeding to the next step.
- Domain-join an Azure VM with Azure AD DS.To access a file share by using Azure AD credentials from a VM, your VM must be domain-joined to Azure AD DS. For more information about how to domain-join a VM, see Join a Windows Server virtual machine to a managed domain.NoteAzure AD DS authentication over SMB with Azure file shares is supported only on Azure VMs running on OS versions above Windows 7 or Windows Server 2008 R2. Sap gui for mac catalina 2017.
- Select or create an Azure file share.Select a new or existing file share that's associated with the same subscription as your Azure AD tenant. For information about creating a new file share, see Create a file share in Azure Files.For optimal performance, we recommend that your file share be in the same region as the VM from which you plan to access the share.
- Verify Azure Files connectivity by mounting Azure file shares using your storage account key.To verify that your VM and file share are properly configured, try mounting the file share using your storage account key. For more information, see Mount an Azure file share and access the share in Windows.
Regional availability
Azure Files authentication with Azure AD DS is available in all Azure Public regions.
Overview of the workflow
Before you enable Azure AD DS Authentication over SMB for Azure file shares, verify that your Azure AD and Azure Storage environments are properly configured. We recommend that you walk through the prerequisites to make sure you've completed all the required steps.
Next, do the following things to grant access to Azure Files resources with Azure AD credentials:
- Enable Azure AD DS authentication over SMB for your storage account to register the storage account with the associated Azure AD DS deployment.
- Assign access permissions for a share to an Azure AD identity (a user, group, or service principal).
- Configure NTFS permissions over SMB for directories and files.
- Mount an Azure file share from a domain-joined VM.
The following diagram illustrates the end-to-end workflow for enabling Azure AD DS authentication over SMB for Azure Files.
1. Enable Azure AD DS authentication for your account
To enable Azure AD DS authentication over SMB for Azure Files, you can set a property on storage accounts by using the Azure portal, Azure PowerShell, or Azure CLI. Setting this property implicitly 'domain joins' the storage account with the associated Azure AD DS deployment. Azure AD DS authentication over SMB is then enabled for all new and existing file shares in the storage account.
Keep in mind that you can enable Azure AD DS authentication over SMB only after you have successfully deployed Azure AD DS to your Azure AD tenant. For more information, see the prerequisites.
Set Permission Level For Users In Macos 2017
Azure portal
To enable Azure AD DS authentication over SMB with the Azure portal, follow these steps:
- In the Azure portal, go to your existing storage account, or create a storage account.
- In the Settings section, select Configuration.
- Under Identity-based access for file shares switch the toggle for Azure Active Directory Domain Service (AAD DS) to Enabled.
- Select Save.
The following image shows how to enable Azure AD DS authentication over SMB for your storage account.
PowerShell
To enable Azure AD DS authentication over SMB with Azure PowerShell, install the latest Az module (2.4 or newer) or the Az.Storage module (1.5 or newer). For more information about installing PowerShell, see Install Azure PowerShell on Windows with PowerShellGet.
To create a new storage account, call New-AzStorageAccount, and then set the EnableAzureActiveDirectoryDomainServicesForFile parameter to true. In the following example, remember to replace the placeholder values with your own values. (If you were using the previous preview module, the parameter for feature enablement is EnableAzureFilesAadIntegrationForSMB.)
To enable this feature on existing storage accounts, use the following command:
Azure CLI
To enable Azure AD authentication over SMB with Azure CLI, install the latest CLI version (Version 2.0.70 or newer). For more information about installing Azure CLI, see Install the Azure CLI.
To create a new storage account, call az storage account create, and set the
--enable-files-aadds
property to true. In the following example, remember to replace the placeholder values with your own values. (If you were using the previous preview module, the parameter for feature enablement is file-aad.)To enable this feature on existing storage accounts, use the following command:
2 Assign access permissions to an identity
To access Azure Files resources with identity based authentication, an identity (a user, group, or service principal) must have the necessary permissions at the share level. This process is similar to specifying Windows share permissions, where you specify the type of access that a particular user has to a file share. The guidance in this section demonstrates how to assign read, write, or delete permissions for a file share to an identity.
We have introduced three Azure built-in roles for granting share-level permissions to users:
Macos User Account
- Storage File Data SMB Share Reader allows read access in Azure Storage file shares over SMB.
- Storage File Data SMB Share Contributor allows read, write, and delete access in Azure Storage file shares over SMB.
- Storage File Data SMB Share Elevated Contributor allows read, write, delete and modify NTFS permissions in Azure Storage file shares over SMB.
Important
Full administrative control of a file share, including the ability to take ownership of a file, requires using the storage account key. Administrative control is not supported with Azure AD credentials.
You can use the Azure portal, PowerShell, or Azure CLI to assign the built-in roles to the Azure AD identity of a user for granting share-level permissions. Be aware that the share level RBAC role assignment can take some time to be in effect.
Note
Remember to sync your AD DS credentials to Azure AD if you plan to use your on-premises AD DS for authentication. Password hash sync from AD DS to Azure AD is optional. Share level permission will be granted to the Azure AD identity that is synced from your on-premises AD DS.
The general recommendation is to use share level permission for high level access management to an AD group representing a group of users and identities, then leverage NTFS permissions for granular access control on directory/file level.
Azure portal
To assign an RBAC role to an Azure AD identity, using the Azure portal, follow these steps:
- In the Azure portal, go to your file share, or Create a file share.
- Select Access Control (IAM).
- Select Add a role assignment
- In the Add role assignment blade, select the appropriate built-in role (Storage File Data SMB Share Reader, Storage File Data SMB Share Contributor) from the Role list. Leave Assign access to at the default setting: Azure AD user, group, or service principal. Select the target Azure AD identity by name or email address.
- Select Save to complete the role assignment operation.
PowerShell
The following PowerShell sample shows how to assign an RBAC role to an Azure AD identity, based on sign-in name. For more information about assigning RBAC roles with PowerShell, see Manage access using RBAC and Azure PowerShell.
Before you run the following sample script, remember to replace placeholder values, including brackets, with your own values.
CLI
The following CLI 2.0 command shows how to assign an RBAC role to an Azure AD identity, based on sign-in name. For more information about assigning RBAC roles with Azure CLI, see Manage access by using RBAC and Azure CLI.
Before you run the following sample script, remember to replace placeholder values, including brackets, with your own values.
3 Configure NTFS permissions over SMB
After you assign share-level permissions with RBAC, you must assign proper NTFS permissions at the root, directory, or file level. Think of share-level permissions as the high-level gatekeeper that determines whether a user can access the share. Whereas NTFS permissions act at a more granular level to determine what operations the user can do at the directory or file level.
Azure Files supports the full set of NTFS basic and advanced permissions. You can view and configure NTFS permissions on directories and files in an Azure file share by mounting the share and then using Windows File Explorer or running the Windows icacls or Set-ACL command.
To configure NTFS with superuser permissions, you must mount the share by using your storage account key from your domain-joined VM. Follow the instructions in the next section to mount an Azure file share from the command prompt and to configure NTFS permissions accordingly.
The following sets of permissions are supported on the root directory of a file share:
- BUILTINAdministrators:(OI)(CI)(F)
- NT AUTHORITYSYSTEM:(OI)(CI)(F)
- BUILTINUsers:(RX)
- BUILTINUsers:(OI)(CI)(IO)(GR,GE)
- NT AUTHORITYAuthenticated Users:(OI)(CI)(M)
- NT AUTHORITYSYSTEM:(F)
- CREATOR OWNER:(OI)(CI)(IO)(F)
Mount a file share from the command prompt
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.
If you experience issues in connecting to Azure Files, please refer to the troubleshooting tool we published for Azure Files mounting errors on Windows. We also provide guidance to work around scenarios when port 445 is blocked.
Configure NTFS permissions with Windows File Explorer
Use Windows File Explorer to grant full permission to all directories and files under the file share, including the root directory.
- Open Windows File Explorer and right click on the file/directory and select Properties.
- Select the Security tab.
- Select Edit. to change permissions.
- You can change the permissions of existing users or select Add.. to grant permissions to new users.
- In the prompt window for adding new users, enter the target user name you want to grant permission to in the Enter the object names to select box, and select Check Names to find the full UPN name of the target user.
- Select OK.
- In the Security tab, select all permissions you want to grant your new user.
- Select Apply.
Configure NTFS permissions with icacls
Use the following Windows command to grant full permissions to all directories and files under the file share, including the root directory. Remember to replace the placeholder values in the example with your own values.
For more information on how to use icacls to set NTFS permissions and on the different types of supported permissions, see the command-line reference for icacls.
4 Mount a file share from a domain-joined VM
The following process verifies that your file share and access permissions were set up correctly and that you can access an Azure File share from a domain-joined VM. Be aware that the share level RBAC role assignment can take some time to be in effect.
Sign in to the VM by using the Azure AD identity to which you have granted permissions, as shown in the following image. If you have enabled on-premises AD DS authentication for Azure Files, use your AD DS credentials. For Azure AD DS authentication, sign in with Azure AD credentials.
Use the following command to mount the Azure file share. Remember to replace the placeholder values with your own values. Because you've been authenticated, you don't need to provide the storage account key, the on-premises AD DS credentials, or the Azure AD DS credentials. Single sign-on experience is supported for authentication with either on-premises AD DS or Azure AD DS. If you run into issues mounting with AD DS credentials, refer to Troubleshoot Azure Files problems in Windows for guidance.
You have now successfully enabled Azure AD DS authentication over SMB and assigned a custom role that provides access to an Azure file share with an Azure AD identity. To grant additional users access to your file share, follow the instructions in the Assign access permissions to use an identity and Configure NTFS permissions over SMB sections.
Next steps
For more information about Azure Files and how to use Azure AD over SMB, see these resources: