chroot question
Chris Petrik
cpet at sdf.org
Wed Apr 22 02:13:39 UTC 2015
One way to fix problems is to compile things staticly
Enviado desde mi Samsung Mobile de Telcel
-------- Original message --------
From: Jon Radel <jon at radel.com>
Date:21/04/2015 5:55 PM (GMT-06:00)
To: freebsd-questions at 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 at stream:/home/jon # chmod -x bin/csh
root at stream:/home/jon # chroot -u jon /home/jon
chroot: /bin/csh: Permission denied
root at stream:/home/jon # chmod +x bin/csh
root at stream:/home/jon # chroot -u jon /home/jon
ELF interpreter /libexec/ld-elf.so.1 not found
Abort
root at 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 at radel.com
More information about the freebsd-questions
mailing list