0

I'm trying to change some NTFS permissions using UNC Path on Powershell. I only have access to this folder using \\hostname\folder.

I need to modify the NTFS permissions, not the Shared Permissions.

I'm trying this:

$Pathv6 = '\\MyHostname\folder'
$acl = Get-Acl $Pathv6 
$acl.SetAccessRuleProtection($true,$false)
$ar = new-object System.Security.AccessControl.FileSystemAccessRule('User01', 'Modify',"ContainerInherit, ObjectInherit","None","Allow")
$acl.AddAccessRule($ar)
set-acl -Path $Pathv6 -AclObject $acl

This code show the error:

set-acl : No se pudieron convertir algunas o todas las referencias de identidad.
At C:\Datos\ArregloACL.ps1:37 char:5
+     set-acl -Path $Pathv6 -AclObject $acl
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (\\MyHostname\...\Client.v6:String) [Set-Acl], IdentityNotMappedException
    + FullyQualifiedErrorId : System.Security.Principal.IdentityNotMappedException,Microsoft.PowerShell.Commands.SetAclCommand

How can I modify the NTFS permissions using UNC and Powershell?

ADrake
  • 13
  • 3
  • Google translates your error as "Could not convert some or all identity references", and Goole also pointed me to: [Some or all identity references could not be translated](https://stackoverflow.com/questions/11440115/powershell-folder-permission-error-some-or-all-identity-references-could-not-b) – boxdog Jul 04 '18 at 11:55
  • In those post, they are trying to change the NTFS permissions on a local folder. I need to change permissions on a remote folder. – ADrake Jul 04 '18 at 12:07

0 Answers0