Peace on all,
I have written this script below, which (supposedly) assigns user full access permission to all folders and sub folders including files from a given target location (say drive D$ or a folder like c:\dir\sub_dir.etc). Once I run the script I immediately go to the target location by Explorer, right click on target location, go to properties, then security and I can see the ACE entry that then script has created. When I click on the advanced button in the security tab, and I can see the ace entry with the following attributes:
Type:Allow, Name: Usr_foo, Permission: Full Control, Apply to: This folder, subfolders and files.
However, when I check the security tabs of any subfolders within the targeted location, I do not see the name of the user I have just granted full access at all listed?? Does anyone know an explanation for this please? Or tell me what am I doing wrong
use strict ‘vars’; use Win32::Perms; my $prms = new Win32::Perms(“\\\\server1\\d$\\”) || die “$!, $^E\n”; print $prms->Path(); if ($prms->Allow(‘User_foo’, FULL | FULL, OBJECT_INHERIT_ACE | CONTAIN +ER_INHERIT_ACE)) { print “\nDone\n”; $prms->Set(); } $prms->Dump;

edited: Fri Jun 28 23:10:23 2002 by jeffa - title change - was 'Permissions and Inheritance'


In reply to Win32 Permissions and Inheritance by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.