Date: Tue, 21 Apr 2015 21:13:23 -0500 From: Chris Petrik <cpet@sdf.org> To: Jon Radel <jon@radel.com>, freebsd-questions@freebsd.org Subject: Re: chroot question Message-ID: <0k1s792en60nrfgjc37xwic5.1429668803761@email.android.com>
next in thread | raw e-mail | index | archive | help
One way to fix problems is to compile things staticly Enviado desde mi Samsung Mobile de Telcel -------- Original message -------- From: Jon Radel <jon@radel.com> Date:21/04/2015 5:55 PM (GMT-06:00) To: freebsd-questions@freebsd.org Cc: Subject: Re: chroot question >> As root, I ran >> >> chroot --userspec=user2:user2 /home/user2 >> chroot: failed to run command ‘/bin/bash’: Permission denied >> >> The dir /home/user2 has in it >> all the *bin and *lib (links) and usr/*bin and usr/*lib files and >> subdirs. >> >> So, what is chroot good for??? >> _______________________________________________ > > > Why don't YOU read the manual as I have read it fully (it is very short) > (run info chroot) > and then tell us all on the list (do not email me personally), what you > found wrong with my invocation of the command!! Toto, we're not in Kansas anymore. chroot --userspec /bin/bash run info chroot You sure you're running FreeBSD? using chroot -u /bin/csh man chroot I can pretty much replicate your error as follows: root@stream:/home/jon # chmod -x bin/csh root@stream:/home/jon # chroot -u jon /home/jon chroot: /bin/csh: Permission denied root@stream:/home/jon # chmod +x bin/csh root@stream:/home/jon # chroot -u jon /home/jon ELF interpreter /libexec/ld-elf.so.1 not found Abort root@stream:/home/jon # Where the 2nd round of errors comes about since I did *not* bother copying all the linked "stuff" into the chroot. So maybe start by making sure the chrooted user actually has permission to execute the bin/bash in the chroot environment??? Sometimes error messages mean what they say. ;-) --Jon Radel jon@radel.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0k1s792en60nrfgjc37xwic5.1429668803761>
