Difference between revisions of "Forkpty failed"

From Linuxintro
imported>ThorstenStaerk
(Created page with "shellinabox gives me forkpty failed as error message. Ok, let's strace it: <pre> # ps -A| grep shellin 132 ? 00:00:00 shellinaboxd 154 ? 00:00:00 ...")
 
imported>ThorstenStaerk
Line 1: Line 1:
[[shellinabox]] gives me  
+
I have a working environment and a non-working environment of [[shellinabox]].
 +
 
 +
In the non-working environment shellinaboxd gives me
 
  forkpty failed
 
  forkpty failed
 
as error message. Ok, let's [[strace]] it:
 
as error message. Ok, let's [[strace]] it:
Line 20: Line 22:
 
[pid  154] write(5, "forkpty() failed\r\n", 18) = 18
 
[pid  154] write(5, "forkpty() failed\r\n", 18) = 18
 
</pre>
 
</pre>
 +
 +
In the working environment the call to chown is missing.

Revision as of 13:38, 5 April 2015

I have a working environment and a non-working environment of shellinabox.

In the non-working environment shellinaboxd gives me

forkpty failed

as error message. Ok, let's strace it:

# ps -A| grep  shellin
  132 ?        00:00:00 shellinaboxd
  154 ?        00:00:00 shellinaboxd
# strace -p 132 -p 154
[...]
[pid   154] chown("/dev/pts/1", 65534, 5) = -1 EPERM (Operation not permitted)
[pid   154] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fd0c22959d0) = 10036
[pid   154] wait4(10036,  <unfinished ...>
[pid   132] <... write resumed> )       = 173
[pid   132] recvmsg(3,  <unfinished ...>
[pid   154] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 4}], 0, NULL) = 10036
[pid   154] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid   154] rt_sigreturn(0x11)          = 10036
[pid   154] close(3)                    = 0
[pid   154] pipe([3, 5])                = 0
[pid   154] write(5, "forkpty() failed\r\n", 18) = 18

In the working environment the call to chown is missing.