On Sun, 29 Nov 2009 21:11:29 +0100, Robert wrote: >On Sun, 29 Nov 2009 11:50:30 +0700 >"~Lst" <[email protected]> wrote: > >> On Sun, Nov 29, 2009 at 6:57 AM, Robert <[email protected]> wrote: >> > >> > *chuckle* >> > >> > If you were running bgplgsh in a chroot from the cmdline you would >> > have to execute it by invoking /bin/bgplgsh because of the changed >> > root. ;) >> > >> > # man chroot >> > # sudo chroot -u www -g www /var/www /bin/bgplgsh >> > >> > Lots of patience to spare around here, if everyone chims in from >> > time to time. >> > >> >> o0o...sorry... >> -bash-4.0$ sudo chroot -u www -g www /var/www /usr/bin/bgplgsh >> chroot: /usr/bin/bgplgsh: No such file or directory >> >> -bash-4.0$ ls -l /usr/bin/bgplgsh >> -r-xr-xr-x 1 root bin 28052 Jul 10 10:06 /usr/bin/bgplgsh >> >> Rgds >> -- >> ~Lst > >Let me requote from your mail i replied to, the part you removed in >your reply: > >On Sun, 29 Nov 2009 04:42:34 +0700 >"~Lst" <[email protected]> wrote: > >> >> >> Could you tell me how is running bgplgsh under chroot ? >> >> > >> >> I tried running bgplgsh under chroot, still works if its via CLI but >> not via web. >> >> -bash-4.0# ps -aux | grep chroot >> www 4592 0.0 0.3 1356 2120 ?? Ss 10:36AM 0:01.07 >> httpd: parent [chroot /var/www] (httpd) >> >> -bash-4.0# ls -l /var/www/bin/bgplgsh >> -r-xr-xr-x 1 root daemon 28052 Nov 29 10:09 /var/www/bin/bgplgsh >> >> -bash-4.0# /var/www/bin/bgplgsh > >You decided to put pgplgsh into /var/www/bin/. >Why do you now try to execute a binary that is somewhere else, where >you didn't copy it?
I don't think that he <decided> to put it there. That is where a clean install puts it. Have a look at your own machine. You should see: $ ls -l /var/www/bin/bgpctl ---------- 1 root bin 197324 Mar 1 2009 /var/www/bin/bgpctl Note that there are no permissions by default but I got the OP to ls -l that file to make sure he had enabled them as required. He has. >I wrote the command based on the info you mailed to the list, not on >the basis that bgplgsh in base is under /usr/bin/. > >You can only access stuff inside your chroot directory after you have >chroot'ed. That's why ppl asked you to test that to see if you copied >everything that is needed into your chroot-dir. > >I guess this is just some missunderstanding about the whole chroot >stuff. Try to have a look again at the manpage for chroot. >You could also search the httpd manpage for chroot and read up on how >that works with the default apache configuration. > >- Robert > *** NOTE *** Please DO NOT CC me. I <am> subscribed to the list. Mail to the sender address that does not originate at the list server is tarpitted. The reply-to: address is provided for those who feel compelled to reply off list. Thankyou. Rod/ --- This life is not the real thing. It is not even in Beta. If it was, then OpenBSD would already have a man page for it.

