How do I determine the parent object (not current parent folder) of a folder on a Windows server? When a folder is moved from one place to another on the same volume, it continues to inherit permission from the original parent object, and that is
not the new parent folder. This is easily demonstrated by removing inheritance, whereupon I can set whatever rights I want. But as soon as I re-enable inheritance, the moved folder again shows rights not matching the new/current parent folder. And no security
change to the parent folder results in any inherited change to the child folder. So the parent object is presumably still the pre-move parent folder. This is also evident in the advanced security settings for the folder, where "Inherited From" says"Parent Object" instead of the current parent folder. If I create another folder manually, it correctly shows the current parent folder path instead of "Parent Object".
To be clear, the fix is easy enough: copy the folder and its contents to a new parallel folder, which will inherit rights from the shared parent folder, then delete the original moved folder that has the parent object retained from before the move. But this
assumes the desired result is to allow the rights to be inherited in the current location.
Suppose I instead want to put the folder back where it came from but have no idea who moved it or from where. It is still inheriting rights from a parent object that is not the current parent folder, so the parent object property must exist in the ACL somewhere,
and I want to retrieve it. It seems that a change of rights to that other (original parent) folder could have unintended consequences on rights to this folder.
So my question is not about how to fix the folder/files; it is about how to determine the original parent object. I have been curious for years about this: how can I identify the original parent object (not the current parent folder) that was retained as
the parent object of the moved folder when it was moved? This would presumably be the parent folder when the moved folder was originally created (or copied to) elsewhere on the same volume.
And while we are at it, anyone have a script that I can run to identify folders whose parent object is not the current parent folder? We will, of course, have times when we do not want rights automatically inherited, but one thing that I want absolutely
100% of the time is for the parent object to be the current parent folder. Anything else will just be chaos.