Results 1 to 6 of 6
  1. #1
    Join Date
    May 2003

    Jailshell - PHP Segmentation Fault


    I just recompiled php as 4.3.6 .

    Now I have an issue:

    A user with jailshell create a simple php script called hello.php , all it does is echo hello.

    When I run it as root or when he runs it in normal bash, it works fine and displays hello.

    However, if you run it by typing 'php hello.php' while in jailshell, it gives "segmentation fault" error and then makes a core dump.

    I've temporarily given him normal bash access to fix this, but am wondering if anyone knows a permanent solution as to why jailshell only is shooting this error out.


  2. #2
    Join Date
    Jun 2002
    United Kingdom
    my guess is that php needs to write to a folder, probably /tmp and doesn't have access to it

    just a guess, but a seg fault is usually caused by something not being able to be written to disc

  3. #3
    Join Date
    Dec 2002
    The Shadows
    jailshell might be not allowing the user access to the directory php is stored in, try placing it in /usr/local/bin or something. Just a guess.
    Dan Sheppard ~ Freelance whatever

  4. #4
    Join Date
    May 2003
    I have tried what you suggested. I have also tried placing the executable php file in /home/virtfs/username/usr/bin which jailshell uses..

    This is stumping everyone, including the cpanel techs.

    Anyone have any ideas?

  5. #5
    Join Date
    Mar 2004
    Chicago, IL
    You could try running 'strace php hello.php' and see what the last thing it does before segfaulting is.

  6. #6
    Join Date
    May 2003
    OK, thanks. Here are the last three lines:

    futex(0x406e2d9c, FUTEX_WAKE, 2147483647, NULL) = 0
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    +++ killed by SIGSEGV +++

    Before that, about 50 lines of brk.

    Before all of the brk lines, I notice this:

    stat64("/etc/krb5.conf", 0xbfffd960) = -1 ENOENT (No such file or directory)
    stat64("/usr/kerberos/etc/krb5.conf", 0xbfffd960) = -1 ENOENT (No such file or d


    This is pretty odd how it only happens in Jailshell. I think the problem is that jailshell is all of a sudden unable or denying access to the configuration files php needs to run. Things like perl and cron still work in jailshell though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts