#!/usr/bin/perl #ログ復帰させた時とかにパーミッション変更するのめんどくさいので use File::Find; print "Content-type: text/plain\n\n"; chmod( 0600, './logs/ip.dat' ); find( \&search, "./logs" ); print "デキターヨ\n"; exit; sub search { if ( $File::Find::name =~ /([0-9_]+)\/bbs\.dat/ ) { chmod( 0600, $_ ); } elsif ( $File::Find::name =~ /([0-9_]+)\/ip\.dat/ ) { chmod( 0600, $_ ); } }