Search code examples
clinuxubuntunet-snmpchroot

running binary with chroot facing issues


#usr/sbin/chroot /var/snmp3/ /usr/local/bin/ionline
/usr/sbin/chroot: syntax error near unexpected token `execve("/var/snmp3/",'
/usr/sbin/chroot: /usr/sbin/chroot: line 1: `execve("/var/snmp3/", ["/var/snmp3/", "/usr/local/bin/ionline2"], [/* 25 vars */]) = -1 EACCES (Permission denied)'


#usr/sbin/chroot /var/snmp1/ /usr/local/bin/ionline
    /usr/sbin/chroot: syntax error near unexpected token `execve("/var/snmp3/",'
    /usr/sbin/chroot: /usr/sbin/chroot: line 1: `execve("/var/snmp3/", ["/var/snmp3/", "/usr/local/bin/ionline2"], [/* 25 vars */]) = -1 EACCES (Permission denied)'

Here is my binary named "ionline" and I am trying to run it with mode "chroot" here I have defined /var/snmp3 as chroot.

my chroot is showing following errors.... what are these ? What is happening here? Can anyone guide me? how to solve them ? Thanks in advance.


Solution

  • It looks like you overwrote your /usr/sbin/chroot with the output from strace at some point...you will probably have to replace the binary.