Linux permissions question

Tom Anderson tanderso at oac-design.com
Thu Apr 1 16:14:35 CEST 2004


On Thu, 2004-04-01 at 04:41, Chris Fortune wrote:
> launch.cgi:
> chdir("/home/uzername/www/a.directory");
> `perl do.many.spam.filters.pl >> /home/uzername/logs/log.txt`;

You need more fault tolerance and error handling.  Was the chdir
successful?  What was the response from the backticks?  Et cetera. 
Also, why are you running a perl program from within a perl program with
backticks?  Perl has lots of functionality for including external code
(library, module, etc).

My instinct tells me this is a path issue, not a permissions issue. 
Check the return value of the chdir, and verify before running
bogofilter the path of the file it is to run on.

BTW, why is it called ".cgi" if it's running from cron... no "common
gateway interface" there.

Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20040401/992860df/attachment.sig>


More information about the Bogofilter mailing list