On our network-shares, we have all kinds of broken permission-inheritance.
Just one example: The folder "D:\Shares\PublicRelations" has full access for the groups "PublicRelations" and "HR" (both with full inheritance set). But the folder "D:\Shares\PublicRelations\SomeTopic" lacks the inherited permissions for the group "HR", even though inheritance is active.
This probably happened, when someone added "HR" to the top-folder and the propagation failed for some reason.
Is there any tool to fix this kind of issue automatically?
Ideally, I would just call it with the parameter "D:\Shares". It will then traverse all directories and fix all inherited permissions where necessary.
icacls <folder> /t /reset
will reset all permissions with the default inheritable ones.Technet reference
I ended up coding it in C#:
I also implemented a check if a fix is necessary at all. But it took some work to get it working reliably:
It found and fixed about 40.000 errors on a 1-million-files-share.
we just had such a case. We made 1 small change in the permissions of the top level folder (added a user account which was later removed again), and that made the system propagate all permissions down the hierarchy again. Not exactly a clean way, but reasonably simple. And this obviously didn't corrupt any permissions given explicitly further down in the folder hierarchy. Thomas