ubuntu - forkpty fails for jailed linux user -


i have ubuntu 12.04 setup on server. every registered user registered linux user & jailed limited system resource access through /etc/security/limits.conf .

i tried running server 1 of registered users. app nodejs app - http://github.com/pocha/terminal-codelearn . uses https://github.com/chjj/pty.js create pseudo terminal every user comes nodejs app.

the app fails 'forkpty(3) failed' error pointed line 184 of https://github.com/chjj/pty.js/blob/65dd89fd8f87de914ff1814362918d7bd87c9cbf/src/unix/pty.cc

pid_t pid = pty_forkpty(&master, name, null, &winp);  if (pid) {   (i = 0; < argl; i++) free(argv[i]);   delete[] argv;   (i = 0; < envc; i++) free(env[i]);     delete[] env;   free(cwd); }  switch (pid) {   case -1:     return throwexception(exception::error(     string::new("forkpty(3) failed."))); 

i able deploy app on http://nitrous.io . have similar way jail user. tried running ulimits -a & matched every value except pending signal. somehow on server, maximum pending signal value not exceed around 90k value while 584k on nitrous server.

below ulimit -a output nitrous server

ulimit -a  core file size          (blocks, -c) 0 data seg size           (kbytes, -d) unlimited scheduling priority             (-e) 0 file size               (blocks, -f) unlimited pending signals                 (-i) 548288 max locked memory       (kbytes, -l) 64 max memory size         (kbytes, -m) unlimited open files                      (-n) 512 pipe size            (512 bytes, -p) 8 posix message queues     (bytes, -q) 819200 real-time priority              (-r) 0 stack size              (kbytes, -s) 8192 cpu time               (seconds, -t) unlimited max user processes              (-u) 256 virtual memory          (kbytes, -v) unlimited file locks                      (-x) unlimited 

the app fails on heroku exact similar error.

can on how make app run on server way works on nitrous.io

i know heroku fails forkpty because they're not running posix, posix-like. things, forkpty, don't work. don't think there's way around :( wish there were.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -