8
1
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."
1If you specifically want 744, you might as well skip group permissions (not applicable on Windows anyway) altogether because they’re already covered with “Everyone” permissions. – Daniel B – 2015-11-23T18:12:37.570