title: icacls not working with active directory security group
body: <p>i'm using icacls to set permissions to a folder for a active directory security group.</p>
  
  <pre><code>mkdir "33 Test" &amp;&amp; icacls "33 Test" /inheritance:d /grant domain\ACL_Test_RW:(OI)(CI)(X,RD,RA,REA,WD,AD,WA,WEA,DC,RC) domain\ACL_Test_RO:(OI)(CI)(RX) &amp;&amp; icacls "33 Test" /remove Domänen-Benutzer
  </code></pre>
  
  <p>Actually this is working fine. I create a folder, disable the inheritance, grant my two permissions ("special" and read only) and remove the domain users. No error message, everything seems to be perfect.</p>
  
  <p>But then: I'm member of the RW-Group - but can't access to the folder.</p>
  
  <p><a href="https://i.stack.imgur.com/JE5T6.png" rel="nofollow noreferrer">enter image description here</a>
  <a href="https://i.stack.imgur.com/gKeHj.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Whats wrong:
  If i grant the same permissions by hand, everything is working fine. But with icalcs it's not working.</p>
  
  <p>I think the problem is here: domain\ACL_Test_RW
  If i open my granted permissions by hand and re-select the ACL-Group, it's working. 
  So, i think i have to change this. But idk how. 
  I already tried with "Domain\company1\groups..." -> error message, no connection between Name and SID.</p>
  
  <p>Anyone an idea?</p>
  
  <p>Yes, i did gpupdate /force + restart ...</p>