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.

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:
    38
    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 :(
     
    JayPH likes this.
  2. Zishan

    Zishan Well-Known Member

    Joined:
    Aug 6, 2005
    Messages:
    104
    Likes Received:
    1
    Trophy Points:
    0
    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:
    79
    Likes Received:
    0
    Trophy Points:
    6
    This one helped me alot.

    Thanks alot guys.
     
Loading...

Share This Page