I'm trying to serve a web page locally using IIS, but I am having trouble programmatically setting the permissions for all the files in my wwwroot directory. When I use the Set-Acl PowerShell directive with a reference file that has the necessary permissions, I only see exactly two changes propagate: The owner is changed, and RW permissions for the group IIS_USRS are added.
PS C:\WINDOWS\system32> $newAcl = Get-Acl C:\inetpub\wwwroot\ PS C:\WINDOWS\system32> Get-ChildItem C:\inetpub\wwwroot\ -Recurse -Force | Set-Acl -AclObject $newAcl PS C:\WINDOWS\system32>
So my question is, what am I doing wrong? How can I get these more detailed permissions to propagate fully? (I've also tried checking and applying Replace all existing inheritable permissions on all descendants with inheritable permissions from this object, but it doesn't seem to help either.)