Setting folder permission on folders on Azure file storage through Powershell

I’ve mapped an Azure FileShare as a network drive and want to setup folder restrictions using PowerShell however I keep getting the error

I’m attempting to Disable inheritence in one step and the then set the required restrictions in second step. I get the error on the first step. How can this be overcome?

Set-Acl : Attempted to perform an unauthorized operation.
At line:66 char:21

  •               Set-Acl -Path $L4_foldername -AclObject $acl
    
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : PermissionDenied: (Z:\ADMIN\Test\A…\Administration:String) [Set-Acl], UnauthorizedAccessException
    • FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand

Regards,
Vinay

Vinay,
Welcome to the forum. :wave:t4:

The error message is pretty obvious …

The account you are using does not have sufficient rights. To change permissions you have to have “Full Control”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.