Oh, so it only doesn't work for directories? Try this:
my $perms = new Win32::Perms( "", PERM_TYPE_DIRECTORY ) || die "...";
for creating your empty SD. I don't usually create empty SD's [I usually just
open and existing one and modify it] in my scripts, so I'm not sure if this is
going to make a difference.
-Shawn
---- Original message ----
>Date: Wed, 9 Oct 2002 12:18:45 +0100
>From: "Martin Wheldon" <[EMAIL PROTECTED]>
>Subject: Win32::Perms again
>To: <[EMAIL PROTECTED]>
>
>Hi,
>
>I've posted my actual code now to cut down on typos from my previous
>posting.
>
>#################### This code works ie changes permissions on
>file###########################
>
>use strict 'vars';
>use Win32::Perms;
>
>my $perms = new Win32::Perms || die "Unable to create object";
>$perms->Allow('Martin', FULL, CONTAINER_INHERIT_ACE);
>$perms->Allow('Martin', FULL, OBJECT_INHERIT_ACE | INHERIT_ONLY_ACE);
>
>$perms->Dump;
>
>if ($perms->Set('d:/ccs/test.txt'))
> {
> print "permissions set OK";
> }
>else
> {
> print "Failed";
> }
>
>#################### This code fails ie attempt to change directory
>permissions ###########################
>
>use strict 'vars';
>use Win32::Perms;
>
>my $perms = new Win32::Perms || die "Unable to create object";
>$perms->Allow('Martin', FULL, CONTAINER_INHERIT_ACE);
>$perms->Allow('Martin', FULL, OBJECT_INHERIT_ACE | INHERIT_ONLY_ACE);
>
>$perms->Dump;
>
>if ($perms->Set('d:/ccs'))
> {
> print "permissions set OK";
> }
>else
> {
> print "Failed";
> }
>
>Any help with this is much appreciated.
>Many thanks for your previous quick responses.
>
>Regards
>
>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