Solved

chroot

Posted on 1997-05-02
2
419 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 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