0

I need to apply the icacls command from a server in the network, for example, server001 to a folder that is on server002. The objective is to add a local security group of server002 on a folder that is on that server, but run the command from the server001. Right now I have the following command:

icacls "\\server002\G$\permissionTest" /grant "The local group":(OI)(CI)RX

It applies the permissions, but in the ACL of the permissionTest folder on server002 I just see the SID of the group, and I need to see it on the friendly form.

Could someone please tell me how to do it?

Vito
  • 101
  • 4
  • from where do you ask the permissions of the folder? If it's from a remote computer, that behaviour is logical, it does not know about the group/sid mapping. If from the remote computer the mapping is correct, then you're set – natxo asenjo Mar 14 '16 at 16:19
  • I'm a little unclear about what you're asking. Is it that you're trying to add an ACL to a folder on server2 using a local group from server2, but applied using the icacls command from server1? Or are you trying to add a group from server1 onto a folder on server2? – Ryan Bolger Mar 14 '16 at 16:19
  • I need to apply the permissions from server001, but the security group belongs to server002, and the folder that needs the permissions is on 002. This is for a script that I have to make, so I'm testing on this two servers first. – Vito Mar 14 '16 at 16:30

1 Answers1

0

I found a solution for this issue. I did this using the psexec tool, so you can run a command on a remote computer as if you were running it locally. I use the following syntax on the command:

psexec /accepteula \\server002 icacls G:\permissionTest /grant "Local server group":(OI)(CI)RX

I run this from server001 and it successfully applied the local group of server002 to the folder that is on server002 as well.

Vito
  • 101
  • 4