Hi,
Make sure that the script You run have sufficient environment variables set. You may need to source in any profile file that is used in Your command shell.
Hi Lakris,
Thanks for the reply.
All then envi varialbles are set to 777. And can you please tell me wat kind of profile options needs to be defined for SSH.
Thanks in advance.
What I meant was that when You run something from the command line You a fuller set of environment variables, such as PATH. Do this experiment, put these lines in Your script:
env > /tmp/cronenv
. ~/.bashrc
env > /tmp/userenv
... (the rest of the code)
and compare the two. The first one shows the environment used by cron, the second what Your command prompt has available. You may need to include /etc/profile or some other rc-file depending on what shell You use.