Reason:
When you change user and forgot to input the '-' paramter, before the username (su informix) instead of (su - informix). Unix won't run .profile (based in the user's home folder) So environment won't configured correctly, etc. $HOME, some kind of environment variable, some initial scripts, etc. So your binary won't work or announce some issues
The same, when you script the cron job, the script will be run in an another shell each time, and by default that shell won't configured (run .profile) so you script will be failed. To avoid this, at beginning of your script, you need to add some codes like:
#!/bin/ksh
No comments:
Post a Comment