I know that I can use icacls to specify the permission on the file, and from What is the equivalent of chmod 777?, I can use
icacls myfile.txt /grant Everyone:F
But how do I set an equivalent for chmod 744? I think I can use
/grant:____:R for just read access, but I'm not sure how to specify the owners and the group permissions as simply as with chmod. When I try this:
icacls myfile.txt /grant Owner:F Group:R Everyone:R
I receive an error, "No mapping between account names and security IDs was done." I'm probably missing something obvious, any ideas?
When I try:
icacls myfile.txt /grant Administrator:F /grant:r Users:R
I take a look at the file in Explorer and it has given Administrator "Special Permissions" (rather than Full Control) and gives Users "Read & execute, Read, and Special Permissions."