running a chroot'ed webserver
- From: Otavio Exel <oexel@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 24 Mar 2008 22:38:37 GMT
Dear List,
I'm setting up a chroot to run my webserver in; I need only a few simple
programs from /bin and /usr/bin (cat, head, date, nc, etc..);
I used to have a script that would analyze the output of "ldd <prog>"
and produce a list of all the libs needed to run the said programs;
after I upgraded from Debian.sarge to Debian.etch it stopped working; I
can see that both the output of ldd and the structure of /lib has
changed substantially!!!
so I guess I need to understand how to read the output of ldd!
please see if you can help me:
$ uname -a
Linux kellogs 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux
$ ldd --version
ldd (GNU libc) 2.3.6
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
$ ldd /bin/cat
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7eb0000)
/lib/ld-linux.so.2 (0xb7fe8000)
how do I read the output of ldd?
line #1 points to an empty name; why?
"locate linux-gate" returns nothing!!!
why such a deep dir structure in line #2?
I was *really* scared when I did:
$ find /lib -name libc.so.6 -exec ls -Ll {} \;
-rwxr-xr-x 1 root root 1147548 Jan 19 10:14 /lib/libc.so.6
-rw-r--r-- 1 root root 1241392 Jan 19 10:15 /lib/tls/i686/cmov/libc.so.6
-rw-r--r-- 1 root root 1245488 Jan 19 10:14 /lib/tls/libc.so.6
$
wow!!! 3 different versions of libc.so.6!!!
(I hope there was a *strong* reason for that)
line #3 has no pointer (=>)! why?
to put it simple: I need to know the list of libs from /lib and /usr/lib
that I have to mirror in /opt/www/lib and /opt/www/usr/lib in order to
/opt/www/bin/cat to run inside the chroot;
[]s and TIA,
PS: this post would fit better in linux.debian.usr but my messages to it
are being silently dropped! and I used to post to linux.debian.user
w/o problems! is linux.debian.user being moderated now?
--
Otavio Exel /<\oo/>\ oexel@xxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: running a chroot'ed webserver
- From: Michael Heiming
- Re: running a chroot'ed webserver
- Prev by Date: Re: Debian apt-get update produces an error "Problem with MergeList"
- Next by Date: Re: Per-user UTF-8 support
- Previous by thread: Re: Errors using eSATA with 2.6.24.3 kernel
- Next by thread: Re: running a chroot'ed webserver
- Index(es):
Relevant Pages
|