in reply to Re: Re: win32 ACL problem.
in thread win32 ACL problem.
I get the feeling that Win32::FileSecurity tries to do the inheritance stuff automagically. I use Win32::Perms for my work as it seems to expose more functionality. Doing the same script with Win32::Perms seems not to have the same problems as the code you posted. Here is my Win32::Perms version:
--blm--use Win32::Perms; $cart='TestingFolder'; mkdir $cart || warn $!; # Create a new Security Descriptor and auto import permissions # from the directory $Dir = new Win32::Perms( $cart ) || die; my @perms; my $perm; $Dir->Get(\@perms); my $index = 0; $Dir->Dump; do { $perm = $perms[$index]; } while ($perm->{'Account'} ne 'Everyone') and (++$index); # One of three ways to remove an ACE print ($Dir->Remove($index)); $Dir->Set(); $Dir->Dump;
ps you may notice that I don't use $Dir->Remove('Everyone'), This is because I could not get it to delete any ACEs. So I compute the index of the ACE in the ACL and delete based on that. I will investigate this further.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: win32 ACL problem.
by blm (Hermit) on Sep 25, 2002 at 08:40 UTC |