Mailinglist Archive: opensuse (2217 mails)
| < Previous | Next > |
Re: [opensuse] crontab problem? How to debug?
- From: "Carlos E. R." <robin.listas@xxxxxxxxxxxxxx>
- Date: Fri, 14 Sep 2007 16:19:18 +0200 (CEST)
- Message-id: <Pine.LNX.4.64.0709141605340.24334@xxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Friday 2007-09-14 at 08:36 -0500, Peter Van Lone wrote:
> > > X-Cron-Env: <PATH=/usr/bin:/bin>
> >
> > Try setting that one.
> >
>
> Are you saying that the path listed is incorrect? What should it be set to?
Not incorrect, different. The path, and other environment variables, that
programs running as cron jobs get are different that what they get when
running normally. Whether this is a problem or not depends on each
particular script, program, whatever. That's why some usually declare
their own path inside the script.
It might be what is happening here, or maybe not. It is just a typical
problem, thus my suggestion.
There is another possibility:
X-Cron-Env: <PHP_BIN_PATH=/home/httpd/bin/php>
X-Cron-Env: <PATH=/usr/bin:/bin>
The php called might not be the one under /home.
> And ... any idea how it might have changed from just a day or two ago,
> when none of the users have modified env settings (or so they say).
Nop. No idea. It could be a small modification in the script.
> One of the website devs thinks it has to do with a "general
> permissions issue" -- whatever that means. How could I verify or
> reject that hypothesis?
>
No idea...
Usually, you look at logs and output. There is no general easy method to
know which file can't be opened, unless the programs says so clearly.
Perhaps you can do a "trace" of the program.
¿Can that file,
'/home/httpd/htdocs/devestore.ourdomain.com/website/export/order_export.php'
be opened? Check all dirs in the path.
I would perhaps write debugging strings to the console or a log file from
the script so that you can check what the program is really doing. Old
style ;-)
> finally -- and forgive my ignorance -- but what tool, as root, do I
> use to fix this users X-Cron-Env: variable, if that is, indeed, the
> problem?
The script should define the needed environment vars, or define them in
the line calling the script. man cron may suggest other possibilities.
- --
Cheers,
Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFG6photTMYHG2NR9URAumlAKCGGP1c2J6/XYGCHN3WMVfSpKoh4ACgmNKr
fXCZ+EH1cEDZU/daP5V/1oU=
=4QYa
-----END PGP SIGNATURE-----
Hash: SHA1
The Friday 2007-09-14 at 08:36 -0500, Peter Van Lone wrote:
> > > X-Cron-Env: <PATH=/usr/bin:/bin>
> >
> > Try setting that one.
> >
>
> Are you saying that the path listed is incorrect? What should it be set to?
Not incorrect, different. The path, and other environment variables, that
programs running as cron jobs get are different that what they get when
running normally. Whether this is a problem or not depends on each
particular script, program, whatever. That's why some usually declare
their own path inside the script.
It might be what is happening here, or maybe not. It is just a typical
problem, thus my suggestion.
There is another possibility:
X-Cron-Env: <PHP_BIN_PATH=/home/httpd/bin/php>
X-Cron-Env: <PATH=/usr/bin:/bin>
The php called might not be the one under /home.
> And ... any idea how it might have changed from just a day or two ago,
> when none of the users have modified env settings (or so they say).
Nop. No idea. It could be a small modification in the script.
> One of the website devs thinks it has to do with a "general
> permissions issue" -- whatever that means. How could I verify or
> reject that hypothesis?
>
No idea...
Usually, you look at logs and output. There is no general easy method to
know which file can't be opened, unless the programs says so clearly.
Perhaps you can do a "trace" of the program.
¿Can that file,
'/home/httpd/htdocs/devestore.ourdomain.com/website/export/order_export.php'
be opened? Check all dirs in the path.
I would perhaps write debugging strings to the console or a log file from
the script so that you can check what the program is really doing. Old
style ;-)
> finally -- and forgive my ignorance -- but what tool, as root, do I
> use to fix this users X-Cron-Env: variable, if that is, indeed, the
> problem?
The script should define the needed environment vars, or define them in
the line calling the script. man cron may suggest other possibilities.
- --
Cheers,
Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFG6photTMYHG2NR9URAumlAKCGGP1c2J6/XYGCHN3WMVfSpKoh4ACgmNKr
fXCZ+EH1cEDZU/daP5V/1oU=
=4QYa
-----END PGP SIGNATURE-----
| < Previous | Next > |