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.

ARGH chown'ed everything

Discussion in 'General Discussion' started by martynh, Jan 29, 2010.

  1. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Need help ! i have done something really bad, I was doing somethings for some clients on one of my server I have accidently chown'ed everything in / and /etc

    is there a way of getting the permissions back to what they were, i have tried updating software and reinstalling cpanel but nothing

    now everythings gone down, all websites, main server, ftp server etc

    thanks
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Well, you can bring back the websites by correcting the ownership for them but it's hard to correct the ownership of every config files under /etc and other partitions. A re-install of the server and restoring the accounts is the only best solution for you at the moment.

    BTW, correct the ownership of all the accounts using a for loop.
     
  3. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    that script didnt do anything and when I go to manually chown the accounts nothing happens... god im screwd
     
  4. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Well, the script will fix the ownership of all the accounts. Regarding the ownership on the rest of the server files/directories, it is not reversible and cannot be fixed either. Get your websites up temporarily and setup a new server in the mean time.
     
  5. Vinu007

    Vinu007 Member

    Joined:
    Aug 9, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    Hello martynh,

    Well you will need to change those permissions manually or restore /etc from backup.

    Try running bellow scripts that should correct some part

    /scripts/fixeverything
    /scripts/chownpublichtmls

    Thanks,
    Vinu007
     
  6. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Thank you very much for this help, i know im not replying much but i am trying everything.

    Its been the biggest disaster iv gone through, i managed to get apache back online and the mail server is now receiving but not sending yet. Just spoke to the DC and they are going to put another drive in later and reinstall the OS but leave the old drive in for me to get the backups across.

    I have never done this before so is there something i need to do once the new drive is online and the old drive connected?

    thanks again for this help
    Martyn
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  8. martynh

    martynh Active Member

    Joined:
    Oct 6, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Well I kept on going 8+ hours and no matter what there are still things wrong, for anyone who does this to there selfs there is only one way to fix it, reinstall your OS which is what i have just requested

    Thanks for the help all, will need some of the tips once I have the new machine up and running because there are still some users with public_html and files belonging to root

    Martyn
     

Share This Page