Discussion:
start-stop-daemon with chroot ?
(too old to reply)
supermega
2008-07-11 02:20:08 UTC
Permalink
Hi,

I'd like to use start-stop-daemon with chroot option, but I get a
strange error. A test:
# start-stop-daemon --start --chroot /bin --exec ls
start-stop-daemon: Unable to start ls: No such file or directory (No
such file or directory)

I should work, shouldn't it?
When I run this:
# start-stop-daemon --start --chroot /bin --exec inexistant_file
The error is different:
start-stop-daemon: stat /bin/inexistant_file: No such file or
directory (No such file or directory)

Why the first command doesn't work?

--
Tomek Gruca
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Sven Joachim
2008-07-11 07:30:19 UTC
Permalink
Hello supermega,

do you also have a real name?
Post by supermega
I'd like to use start-stop-daemon with chroot option, but I get a
# start-stop-daemon --start --chroot /bin --exec ls
start-stop-daemon: Unable to start ls: No such file or directory (No
such file or directory)
I should work, shouldn't it?
No, this cannot work. At least not if /bin/ls is the standard file from
the coreutils package.
Post by supermega
# start-stop-daemon --start --chroot /bin --exec inexistant_file
start-stop-daemon: stat /bin/inexistant_file: No such file or
directory (No such file or directory)
Why the first command doesn't work?
Because /bin/ls is dynamically linked, but no linker or shared libraries
exist in the chroot. The error you see is described in execve(2):

ENOENT
The file filename or a script or ELF interpreter does not exist,
or a shared library needed for file or interpreter cannot be
found.

Running a statically linked program should work (can't try right now
because I don't have one installed).

Sven
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
supermega
2008-07-11 13:50:06 UTC
Permalink
Post by Sven Joachim
Hello supermega,
do you also have a real name?
Post by supermega
I'd like to use start-stop-daemon with chroot option, but I get a
# start-stop-daemon --start --chroot /bin --exec ls
start-stop-daemon: Unable to start ls: No such file or directory (No
such file or directory)
I should work, shouldn't it?
No, this cannot work.  At least not if /bin/ls is the standard file from
the coreutils package.
Post by supermega
# start-stop-daemon --start --chroot /bin --exec inexistant_file
start-stop-daemon: stat /bin/inexistant_file: No such file or
directory (No such file or directory)
Why the first command doesn't work?
Because /bin/ls is dynamically linked, but no linker or shared libraries
        ENOENT
                The file filename or a  script or ELF interpreter does not exist,
                or  a shared  library needed  for file  or interpreter  cannot be
                found.
Running a statically linked program should work (can't try right now
because I don't have one installed).
Sven
--
Thanks! Now I copied some libs and it works :)
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Continue reading on narkive:
Loading...