Difference between pages "Forkpty failed" and "Pipe"

From Linuxintro
(Difference between pages)
imported>ThorstenStaerk
 
imported>ThorstenStaerk
(Redirected page to PiPing)
 
Line 1: Line 1:
I have a working environment and a non-working environment of [[shellinabox]].
+
#REDIRECT [[piPing]]
 
 
In the non-working environment shellinaboxd 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 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
 
</pre>
 
 
 
In the working environment the call to chown is missing.
 
 
 
Solution:
 
shellinaboxd --user=0
 

Latest revision as of 11:02, 6 April 2015

Redirect to: