Active IQ Unified Manager Discussions

Setting file level permissions (for Local filer group) on OnTap CIFS shared files via powershell

siemin81
2,053 Views

Hi,

 

I am trying to set file level (NTFS) permissions on files shared by netapp filer (7-mode) using PowerShell (ver. 2.0 and 4.0)

It works for domain accounts like:

 

$file =get-item file.txt
$acl=get-acl $file
$account = "domain\validaccount"
$Rights = [System.Security.AccessControl.FileSystemRights]"Modify"
$rules= $account,$Rights,"None”,”None”,”Allow”
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $rules
$acl.AddAccessRule($accessRule)
set-acl -path $file -aclobject $acl

But as soon as I change the $account for filer local group (which I can set properly using windows explorer (righ click-> security->edit->add etc.) it doesn't work

 

so:

 

$account = "FILERNAME\ValidFilerLocalGroup"

does NOT work.

 

Please advise. I am trying to make it work for days now and I tried to find similar problem on this forum as well as other places, without any luck so far.

TIA

1 REPLY 1

sinhaa
2,009 Views

@siemin81

 

Can you post the error that you are getting?

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public