title: Quickly Setting Inheritable ACEs on Large Network Filesystems
body: <p>I have a question regarding ACLs on a network filesystem.</p>
  
  <p>Basically, I want to set a permission on a top level folder object that has potentially 100,000+ file and folder objects below it. I want the permission to be inheritable via all sub folders and sub files (IE '<em>Applies to files, folders, and subfolders</em>' is <strong>true</strong>).</p>
  
  <p>I don't want to  trash any existing inheritable permissions (IE '<em>Replace all child object permissions with inheritable permissions from this object</em>' is <strong>false</strong>).</p>
  
  <p>So, when I run a Set-ACL, SetACL.exe, XCACLS.vbs, or even use the Windows GUI, it takes a very long time for the process to complete - obviously due to the large size of the sub directory. </p>
  
  <p>I'm used to this now, BUT:</p>
  
  <p>I wanted to know - why <strong><em>exactly</em></strong> is this? </p>
  
  <p>At the end of the day, aren't I only writing one ACE on one single folder object? </p>
  
  <ul>
  <li>I'm not traversing the directory; </li>
  <li>I'm not modifying the individual ACLs on the sub files and folders (I don't think); and</li>
  <li>I'm not replacing permissions</li>
  </ul>
  
  <p>I assumed that if you accessed the sub folder/file object, it would check it's explicit ACEs to see if you had permissions, and if you didn't have it, it would then check for any inheritable permissions (from parent folder objects) that might give you access.</p>
  
  <p>So, does setting an inheritable permission also cause a new, individual ACE to be written to every single sub file and folder, even though you are technically only setting one ACE at the top level?</p>
  
  <p>Is there <strong>any</strong> way to set an ACE at the top level and not have the command to go and enumerate through the whole sub directory? I'm looking to do this quickly and efficiently on a massive amount of files and folders.</p>
  
  <p>I hope this makes sense. Look forward to any suggestions.</p>
  
  <p>Rhys.</p>