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!

Jailshell: What not to do and how to fix it

Discussion in 'General Discussion' started by Arvand, Aug 19, 2003.

  1. Arvand

    Arvand Well-Known Member

    Jul 26, 2003
    Likes Received:
    Trophy Points:
    What not to do: (based on personal experience on a fully deployed server... almost gave myself a heart attack :D )

    Never ever touch directories inside the /home/virtfs folder. As nick has mentioned they "mounted?" from your own root files and whaever change you make you will be making to your root files. For example... rm -rf /home/virtfs/username (in an attempt to revoke the user's jailshell) will result in a server with no sshd and an empty /usr/sbin...

    Now that you've done it... How to fix it:

    If its a test server or a new server just order a restore... it will save you time. However, if you have customers on the server, this is what did it for me:

    DO NOT RESTART!!! You restart and you lose ssh which means that restore is your only chance. will be your friend for the next 5-10 hour. First fix Ssh.if you have a backup sshd... place it into /usr/sbin/. If you don't, recompile openssh and place the sshd in /usr/sbin.

    Then do: rpm -V -a | grep missing.

    It will show you some of the files that are missing. These files will usually be in /usr/sbin. Search for the path of each file at and find the rpm thats right. You can do rm -q RPM to check which version was installed previously. After about 10 hours you should be through the list of missing files. You can now reboot and should have a fully working system... Support Ticket Number:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Rooter likes this.
  2. happyadmin

    happyadmin Guest


    Good post :) Support Ticket Number:

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