#! 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"; }