There is no fix all for this but the following powershell commands may be useful:
Use SetAccessRuleProtection() to disable inheritance and remove inherited ACEs:
$acl.SetAccessRuleProtection($true, $false)
Use RemoveAccessRule() to remove existing (non-inherited) ACEs:
$acl.Access | ForEach-Object { $acl.RemoveAccessRule($_) | Out-Null }
Use AddAccessRule() to add new ACEs:
$ace = New-Object Security.AccessControl.FileSystemAccessRule "user", ...
$acl.AddAccessRule($ace)
...
Do this only for the topmost folder. Leave inheritance enabled everywhere below, so your changes are propagated automatically.
I hope this answers your question.
Thanks.
--
--If the reply is helpful, please Upvote and Accept as answer--