Hi Shawn,

Tried opening a existing SD and modifying but cannot get that to work
either. I'm afraid your suggestion does'nt seem to work either. I'm begining
to think there may be a problem with the permissions on the folder I'm
trying to change or that I'm attempting to set permissions that are invalid
for a directory.

Any other suggestions are gratefully recieved.

Regards

Martin Wheldon

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Shawn Boyle
Sent: 09 October 2002 12:37
To: Martin Wheldon
Cc: [EMAIL PROTECTED]
Subject: Re: Win32::Perms again


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


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to