>>144
$logdir = dirname(__FILE__);
って書いてるんだから、自分のwebroot以下にあるディレクトリにスクリプトうごかしてるんだろ?
echo sprintf('%o', fileperms( $logdir );
が吐く文字列を書かないと。