The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php.ini is not visible in jailshell

Discussion in 'General Discussion' started by gator, Mar 24, 2004.

  1. gator

    gator Active Member

    Joined:
    Feb 27, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    I have several issues with running PHP in command line mode because of jailshell. The issues all relate to a missing php.ini file that is on the system but jail shell cannot see it. Anyone know how to make a file visible to jailshell users?

    The 'real' filesystem has 2 symlinks and the real file at:

    /usr/lib/php.ini -> ../local/lib/php.ini
    ../local/lib/php.ini -> /usr/local/Zend/etc/php.ini
    /usr/local/Zend/etc/php.ini (the real file with Zend installed)

    yet jailshell users just see the first broken symlink of /usr/lib/php.ini. The real php.ini and one symlink are not visible.

    This result is mysql cannot connect (it's looking for mysql.sock in the wrong place; my.cnf doesn't help) and no Zend extensions (like my encoder) are loaded, etc, etc.

    Any ideas much appreciated!
     
  2. gator

    gator Active Member

    Joined:
    Feb 27, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    OK, as near as I can figure I need to add the files to the /home/virtfs/username directory.

    However, ... something doesn't add up. I read elsewhere on this forum that these files are hard links to the original files and do not delete them or you delete the original system files. But that's not what a hard link does so I am wondering if they are really hard links?

    If there are 2 hard links to the same file (the original and the one in virtfs) then the file space for the file remains allocated until BOTH hard links are removed. So if people are hosing there servers by deleteing files under virtfs then can they be hard links?

    I'd like to use hard links because I don't want multiple copies of these files for every shell user. So should I create a hard link or does this virtual filesystem work differently than traditional hard links?
     
Loading...

Share This Page