"chroot"ing a script
Hi,
how could we run a script from a certain directory? Its a cron job need to be run by userA What was done crontab: Code:
15 * * * * userA /etc/cron.daily/script.sh Code:
cd /desired-dir issue is it does cd and then run rest of the commands from root(I assume) Any Ideas? |
If you mean that you want to run command one and command two from /desired-dir then the cd command is not what you want. Linux does not look for commands in the current directory. Linux looks for commands in the PATH and if the current directory is not on the PATH then those commands will not be found. Change the PATH instead of changing the current directory.
Code:
PATH=$PATH:/desired-dir Steve Stites |
All times are GMT -5. The time now is 11:45 PM. |