locked
Remove and re-add inheritance on file structure. RRS feed

  • Question

  • Server 2008R2. Somehow, over time, I have some instances where inheritance has been removed, rights screwed with, and I have been blocked from having rights on files where I am supposed to. I suspect it is sloppy work from junior administrators not following proper procedures, but that is beside the point. I have corrected the rights issues via cacls and takeown where necessary, but I want to verify and re-set inheritance because it is broken somewhere in the directory structure. I am unable to correct this via the GUI by "apply on this and subfolders", I get access is denied, even though I can verify on the file which it is complaining that I do not have access to that I (the administrators local group) has full control, is owner of the file, and I can open the file.

    I am looking for a scripted way to first REMOVE inheritance on every file in a given directory AND subdirectories, then re-apply inheritance and set the inherited ACL's on the files.

    First, is this possible, second if so, how?

    Tuesday, May 10, 2011 2:40 PM

Answers

  • Hi,

    I think it is possible with using command tool such as icacls.

    For example, icacls c:\root\sub /reset /t can help reset the permission of c:\folder\sub folder to inherit the permission settings on c:\root. Then we can modify the permission on c:\root\sub spcifically as incorrect permissions are removed.  


    Shaon Shan |TechNet Subscriber Support in forum |If you have any feedback on our support, please contact tngfb@microsoft.com
    Monday, May 16, 2011 8:50 AM