Solved

chroot

Posted on 1997-05-02
2
415 Views
Last Modified: 2013-12-26
when I try tu use the chroot command, I always have:
chroot: No such file or directory

The result of 'which chroot' is /etc/chroot and when I type 'chroot <enter>', I have:
usage: chroot rootdir command arg ...

I've tried to "configure" the new rootdir in the same way as I did for anonymous ftp (create a directory rootdir/dev and creating the special files with 'mknod') but it still doesn't work.

Thanks in advance for your help

Benoit.
0
Comment
Question by:bb021897
2 Comments
 
LVL 3

Expert Comment

by:dhm
ID: 1292755
I need to know what system you're using, and the exact chroot command line you're trying to run.  Also, an "ls" of the new root directory would be good.

Remember that the chroot happens before the command is executed, so if you give a full pathname to the program (which is a good idea) it has to be relative to the new root directory.  Also, as you've guessed, if the executable requires any shared libraries or anything, you have to provide copies in the chroot-ed environment.
0
 
LVL 2

Accepted Solution

by:
mlev earned 100 total points
ID: 1292756
Like it says, you need to specify a command to run.
Try for example, chroot <dir> /bin/sh
(You do have to create a mini-tree, and you have to be root).
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now