Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

jailmount missing files in /etc

Discussion in 'Security' started by sparek-3, Oct 26, 2016.

Tags:
  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,762
    Likes Received:
    116
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    /usr/local/cpanel/bin/jailmount appears to be missing mounting the files in /etc for the user's chroot.

    Code:
    # ls -al /home/virtfs/chroot2w/etc
    /bin/ls: cannot access /home/virtfs/chroot2w/etc: No such file or directory
    # /usr/local/cpanel/bin/jailmount chroot2w
    # ls -al /home/virtfs/chroot2w/etc
    total 24
    drwxr-xr-x  6 root root 4096 Oct 26 12:45 ./
    drwx--x--x 13 root root 4096 Oct 26 12:45 ../
    drwxr-xr-x  2 root root 4096 May 26 00:04 alternatives/
    drwxr-xr-x 11 root root 4096 Oct 20 10:16 apache2/
    drwxr-xr-x  3 root root 4096 Feb 25  2014 mail/
    drwxr-xr-x  3 root root 4096 Oct 26 12:45 pki/
    This would seem to be an issue with PHP-FPM using chroot - (touch /var/cpanel/feature_toggles/apachefpmjail - Enhance FPM support)

    If you change the user's shell to jailshell and change into that user, then /etc gets populated as it should:

    Code:
    # usermod -s /usr/local/cpanel/bin/jailshell chroot2w
    # su - chroot2w
    Attempting to create directory /home/chroot2w/perl5
    [~]# exit
    logout
    # ls -al /home/virtfs/chroot2w/etc
    total 1240
    drwxr-xr-x 13 root root       4096 Oct 26 12:51 ./
    drwx--x--x 14 root chroot2w   4096 Oct 26 12:51 ../
    -rw-r--r--  1 root root       1624 Feb 26  2014 aliases
    drwxr-xr-x  2 root root       4096 May 26 00:04 alternatives/
    -rw-r--r--  1 root root      10634 Jul  6 10:04 antivirus.exim
    .
    .
    .
    I am seeing this issue in 11.58.0.32 as well as 11.56.0.35
     
  2. JacobPerkins

    JacobPerkins Well-Known Member

    Joined:
    May 2, 2014
    Messages:
    619
    Likes Received:
    96
    Trophy Points:
    103
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    Would you mind throwing in a ticket on this so we can check the system out and get a case filed? Thank so much!
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,762
    Likes Received:
    116
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    Support Request ID is: 7832975
     
  4. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    94
    Likes Received:
    14
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    I am facing the same error.Was there a resolution to this error? Seeing in v64 and v66
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,762
    Likes Received:
    116
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    I think the workaround I came up with for this was to run:

    su -s /usr/local/cpanel/bin/jailshell -c exit %user%

    Which effectively logs into the user's jailshell and immediately exits. This creates the complete /home/virtfs/%user% structure.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Internal case EA-5524 is open to address an issue where an account's virtual file system is not updated after enabling PHP-FPM. The following command is available as a workaround:

    Code:
    /scripts/update_users_jail $username
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice