#Gets the rights for all files listed on the command line
use Win32::FileSecurity;
foreach( @ARGV ) {
next unless -e $_ ;
if ( Win32::FileSecurity::Get( $_, \%hash ) ) {
while( ($name, $mask) = each %hash ) {
print "$name:\n\t";
Win32::FileSecurity::EnumerateRights( $mask, \@happy );
print join( "\n\t", @happy ), "\n";
}
} else {
print( "Error #", int( $! ), ": $!" );
}
}
|