return unless eval{ Win32::FileSecurity::Get($_, \%users); 1 }; #### #! perl -sw use strict; use File::Find; use Win32::FileSecurity; #determine the DACL mask for Full Access my $fullmask = Win32::FileSecurity::MakeMask('FULL'); &find(\&wanted,"\\"); my %users; sub wanted { # Win32::FileSecurity::Get does not like the paging file, skip it return if ($_ eq "pagefile.sys"); return unless -f $_; unless( eval{ Win32::FileSecurity::Get($_, \%users); 1 } ) { print "Attempt to get the ACLs for $_ failed with: \n", $@; print "Skipping ...\n"; return; } return unless defined $users{"Everyone"}; return unless $users{"Everyone"} == $fullmask; print "$File::Find::name\n"; } #### Attempt to get the ACLs for drwtsn32.log failed with: Error handling error: 122, Dacl is NULL: implicit access grant at C:\test\junk2.pl Skipping ...