Hello experts, I've been trying to write a program that, as part of it, will reset permissions on all subfolders of a given folder back to what's inherited from the root folder only (all explicitly defined permissions removed and inheritance turned on). So for example, given the following structure:
| +- FolderABA
If you give the program the location of FolderA, it'll go into FolderAA, FolderAB, FolderAC and all their subfolders (ABA, ACA, ACB, ACC) and reset the permissions to only what they've inherited from FolderA (leaving FolderA's permissions alone). I've already got the code to get the folder in question (as a string), as well as all the subfolders (in a recursive function, also as a string). I just can't seem to wrap my head around the access APIs in the amount of spare time I have. I'm hoping someone can help me out here with a code sample for doing this, and hopefully with some sort of brief description of what it does.
Not sure if the problem description makes sense or is in enough detail, if you need more info, let me know. Thanks!