-   Linux - Newbie (
-   -   "chroot"ing a script (

knockout_artist 02-05-2009 03:12 PM

"chroot"ing a script

how could we run a script from a certain directory?

Its a cron job need to be run by userA

What was done


15 * * * *      userA /etc/cron.daily/

cd /desired-dir
command one
command two

issue is it does cd and then run rest of the commands from root(I assume)

Any Ideas?

jailbait 02-05-2009 03:45 PM

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.


command one
command two

Steve Stites

All times are GMT -5. The time now is 04:12 PM.