deny inheritance only from parent folder?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; text-align:left
I have 4 folders in my application with certain permissions on each...
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; text-align:left
folder1 has folder2 inside it, folder2 has folder3 and folder4 in it
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; text-align:left
im able to deny inheritance from folder2 to folder3 with the below code, but i want to have inheritance from folder1 to folder 3?
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; text-align:left
i want the folder to inherit all the properties from folder1
<pre class="lang-cs prettyprint" style="padding:5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; width:auto; max-height:600px; text-align:left <code style="margin:0px; padding:0px; border:0px; font-size:14px; vertical-align:baseline; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif <span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b string<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent folderpath<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 =<span class="str" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#800000 "xyz"<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ;<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b string<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af UserAccount<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 =<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="str" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#800000 "asp"<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ;<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af System<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent IO<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af DirectoryInfo<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FolderInfo<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 =<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b new<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af System<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent IO<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af DirectoryInfo<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 (<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent folderpath<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 );<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af DirectorySecurity<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FolderAcl<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 =<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b new<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af DirectorySecurity<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ();<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FolderAcl<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af AddAccessRule<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 (<span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b new<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FileSystemAccessRule<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 (<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af UserAccount<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ,<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FileSystemRights<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af ReadData<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ,<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af InheritanceFlags<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af ContainerInherit<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 |<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af InheritanceFlags<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af ObjectInherit<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ,<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af PropagationFlags<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af None<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ,<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af AccessControlType<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af Allow<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ));<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b const<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent bool protectRulesFromInheritance <span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 =<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b true<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ;<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b const<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent bool preserveInheritance <span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 =<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#00008b true<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ;<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FolderAcl<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af SetAccessRuleProtection<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 (<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent protectRulesFromInheritance<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 ,<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent preserveInheritance<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 );<span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent <br/> <span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FolderInfo<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 .<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af SetAccessControl<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 (<span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#2b91af FolderAcl<span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:#000000 );[/code][/code]

View the full article
 
Back
Top