Assuming this is your actualy code...you have a typo.
# Directory to set permissions on
$dir = "c:\test";
But you use the variable $Dir in the rest of your script. Change one or the
other.
-Shawn
---- Original message ----
>Date: Tue, 8 Oct 2002 15:22:46 +0100
>From: "Martin Wheldon" <[EMAIL PROTECTED]>
>Subject: Win32::Perms problem
>To: <[EMAIL PROTECTED]>
>
>Hi,
>
>Could anyone have a browse over the following code and hopefully tell me
>where I'm going wrong.
>I'm running Win2k pro and Actvive perl 5.6.1 build 631
>
>use Win32::Perms;
>
># Directory to set permissions on
>$dir = "c:\test";
>
>#create NULL security descriptor or die
>$secdesc = new Win32::Perms() || die;
>
>#import the current permissions into newly created security descriptor
>$secdesc->Import($Dir);
>
>#Allow user martin rights to directory in Discretionary ACL
>$secdesc->Allow('Martin', READ, CONTAINER_INHERIT_ACE);
>$secdesc->Allow('Martin', READ, OBJECT_INHERIT_ACE | INHERIT_ONLY_ACE);
>
>#print info for security descriptor
>$secdesc->Dump;
>
>#all works fine to this point the last line returns a fail
>#assign security descriptor to directory
>$secdesc->Set($Dir);
>
>Thanks in advance
>
>
>Martin Wheldon
>
>_______________________________________________
>Perl-Win32-Admin mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs