can't exec /usr/sbin/named-xfer: Permission denied

Kevin Darcy kcd at daimlerchrysler.com
Mon Apr 2 19:25:41 UTC 2001


Yes, this is getting somewhat OT. The "cat" files are just localization stuff
-- "chroot" is probably just trying to access those to display its error
message in the right language, etc., but it's OK that they aren't there
(obviously, since chroot was able to display the message anyway).

As for why the execve() is failing, I have no idea. Are you absolutely
*sure* that you have a bash executable at /chroot/named/bin/bash? And it
*is* an executable, right, as opposed to some wrapper with a shebang
("#!") which invokes some other program (which may not exist in the chroot
jail), right? If all of that is true, I'm stumped. I'm no Linux guru. Perhaps
you should ask a Linux group.


- Kevin

Stephen Amadei wrote:

> The continuing saga:
>
> Hey guys... I'm noticed my servers ar having the same problem as Brian,
> yet when trying to strace chroot a bash shell in my named chroot jail, I
> noticed the following:
>
> -----------------------
> chroot("/chroot/named")                 = 0
> execve("/bin/bash", ["/bin/bash"], [/* 30 vars */]) = -1 ENOENT (No such
> file or directory)
> brk(0x804a6ac)                          = 0x804a6ac
> brk(0x804b000)                          = 0x804b000
> stat("/etc/locale/C/libc.cat", 0xbffff53c) = -1 ENOENT (No such file or
> directory)
> stat("/usr/share/locale/C/libc.cat", 0xbffff53c) = -1 ENOENT (No such file
> or directory)
> stat("/usr/share/locale/libc/C", 0xbffff53c) = -1 ENOENT (No such file or
> directory)
> stat("/usr/share/locale/C/libc.cat", 0xbffff53c) = -1 ENOENT (No such file
> or directory)
> stat("/usr/local/share/locale/C/libc.cat", 0xbffff53c) = -1 ENOENT (No
> such file or directory)
> write(2, "execvp: No such file or director"..., 34execvp: No such file or
> directory
> ) = 34
> _exit(1)                                = ?
> -----------------
>
> Now, I realize this is getting a bit OT, but I think it may be linked to
> my named-xfer not running from a chrooted named.
>
> /bin/bash exists in both the real world and my chroot jail... yet it's not
> found running 'strace chroot /chroot/named /bin/bash'.  All the libraries
> are their, but what gets my attention is the five stats looking for
> 'blah/blah/libc.cat'.  What the heck is this file?!?  I have a
> /usr/share/locale directory, but no 'C' directory or any libc.cat files.
> I then checked several other servers of different Slack vintage... none
> have libc.cat files either.  What is this, and how can I fake it in a
> chroot?  /bin/bash obviously works in the normal world, and a strace of it
> shows no calls to /usr/share/locale/*, so I assume chroot needs these
> files.  Help!
>
>                                         ----Steve
> Stephen Amadei
> Dandy.net CTO
> Atlantic City, NJ





More information about the bind-users mailing list