FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-11-2008, 01:59 AM
supermega
 
Default start-stop-daemon with chroot ?

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-11-2008, 07:17 AM
Sven Joachim
 
Default start-stop-daemon with chroot ?

Hello supermega,

do you also have a real name?

On 2008-07-11 03:59 +0200, supermega wrote:

> 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?

No, this cannot work. At least not if /bin/ls is the standard file from
the coreutils package.

> 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?

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-11-2008, 01:24 PM
supermega
 
Default start-stop-daemon with chroot ?

On 11 Lip, 09:30, Sven Joachim <svenj...@gmx.de> wrote:
> Hello supermega,
>
> do you also have a real name?
>
> On 2008-07-11 03:59 +0200, supermega wrote:
>
> > 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?
>
> No, this cannot work. *At least not if /bin/ls is the standard file from
> the coreutils package.
>
> > 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?
>
> 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-REQU...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Thanks! Now I copied some libs and it works


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org