#! perl -w use Win32::Perms; sub AddGroupToDir { my ($group, $dir)=@_; my $perms = new Win32::Perms($dir) || die "\n$^E\n"; my $counter = $perms->Get(\ my @list); print "\nAccount '$group'\t Path " . $perms->Path() . "\n"; $perms->Add("$group", FULL|FULL, ACCESS_ALLOWED_ACE_TYPE, OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE); if ($perms->Set()) { print "Account: '$group' was granted Full ACE permission to: '". $perms->Path() . "'", 0x00000000|0x00000040|0x00000000,"' Operation Successful"; } else { print "This particular operation has failed\n\n***PLEASE CONTACT THE ADMINISTRATOR***\n", 0x00000000|0x00000040|0x00000000,"Operation Failure"; } $perms->Close(); } AddGroupToDir( 'ALL', 'D:/TEMP' ); __END__ C:\test>189474 Account 'ALL' Path D:\TEMP Account: 'ALL' was granted Full ACE permission to: 'D:\TEMP'64' Operation Successful C:\test>