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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,457
    Likes Received:
    35
    Trophy Points:
    178
    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. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    604
    Likes Received:
    94
    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,457
    Likes Received:
    35
    Trophy Points:
    178
    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:
    76
    Likes Received:
    10
    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
     
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,457
    Likes Received:
    35
    Trophy Points:
    178
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page