[prog] Perl from cron
jennyw
jennyw at dangerousideas.com
Thu Jun 23 13:13:14 EST 2005
Hi, Jacinta and Almut,
Problem solved!
Almut -- Your tip about getcwd() having a problem made me think about
changing the working directory. I did this in the Ruby script, and
things seem to be working!
Jacinta -- you might be correct about the taint issue or maybe it's
because of the Ruby script. It's hard to tell. When I ran the script you
posted from cron directly, it worked fine -- it was able to find the
directory okay. The difference is that there are a lot fewer layers
involved ... What is happening is that cron is calling a Ruby script
which in turn invokes a getmail (which is written in Python). Getmail
changes the UID before it invokes the Perl script.
Once I added a Dir.chdir() to the Ruby script that kicks off everything,
things worked great. Not sure why there wouldn't be a cwd, but that
seems to be the problem. I think it might have something to do with the
SUSE cron config -- I didn't have this problem with the same scripts in
Debian.
Jen
More information about the Programming
mailing list