[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running script within chroot jail (OT)

On Wed, Dec 28, 2005 at 12:09:20PM +1000, Michael Bellears wrote:

> Hoping someone can point me in the right direction as to how I would
> translate the above into a shell script, as my mediocre attempt fails:

  You were so close!  You need to run "chroot /path /command"
 (As you can see if you run "man chroot".)


chroot /var/chroot/apache/ /usr/local/awstats/tools/awstats_updateall.pl now

  Or for another example:
chroot /var/chroot/apache /etc/init.d/apache stop

  The command you run is specified in the *chroot* filesystem, rather
 than on the full system.  So "/usr/local" rather than

Debian GNU/Linux System Administration

Reply to: