0

The OS is Windows server 2012.

I am trying to use command icacls C:\folder\targetfile /grant domain\usergroup:(rx) to give permissions on certain file.

The command works when executed on command line.

But when I run it from batch file I get the following error:

domain\usergroup: No mapping between account names and security IDs was done. I am executing this command as domain admin. Domain admin has full control over target file and folder. Local admin works no better. I also get same when trying to execute batch from Task Scheduler.

How can I make this work from batch file?

1
  • 1
    Windows can't make sense of which domain\usergroup you mean. I understand the privacy concerns, but if you could possibly include the actual names, instead of dummy names, that might help. You know, if we saw spaces, uppercase, well-known SID's, it might give us some clue...
    – pgr
    Feb 8, 2015 at 19:21

1 Answer 1

0

Comment by pgr pointed me to the right direction: The problem was caused by letter ö in the name of the group.

If I change target group to one that has no nordic letters in its name it works fine.

Though I got the problem solved, it would still be nice to know if there is way to make batch file work with those characters.

EDIT: As pointed out in the comment, the command chcp 1252 before icacls solves the problem.

1
  • 1
    chcp 1252 will use code page 1252 and allow you to use the ö.
    – user251292
    Feb 18, 2015 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .