NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

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

siemin81
2,990 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,946 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