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!

recreate files in /var/cpanel/userdata

Discussion in 'General Discussion' started by anand, Oct 29, 2008.

  1. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I have one of my customer vps's defaced. Several hundred files were replaced by defaced files. One of the main directory replaced is /var/cpanel/userdata. This contains the username/main and username/main.cache file which has the client domain in it. Is there a way to recreate the file via some script ? Manually doing it would be a real pain :(
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    JayPH likes this.
  2. Zishan

    Zishan Well-Known Member

    Joined:
    Aug 6, 2005
    Messages:
    104
    Likes Received:
    1
    Trophy Points:
    168
    This is what I can suggest:

    - Take the backup of /var/cpanel/userdata
    - Run /usr/local/cpanel/bin/userdata_update --reset so that /var/cpanel/userdata can be regenerated.
    - Move the required files from new /var/cpanel/userdata to old one.
    - Move the old /var/cpanel/userdata back after copying the required files.
    - Rebuild Apache conf as /usr/local/cpanel/bin/build_apache_conf
    - Restart Apache /etc/init.d/httpd stop ; /etc/init.d/httpd start
     
    #2 Zishan, Oct 29, 2008
    Last edited: Oct 29, 2008
  3. sodapopinski

    sodapopinski Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    90
    Likes Received:
    2
    Trophy Points:
    308
    This one helped me alot.

    Thanks alot guys.
     
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