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.

help - i chowned the whole /var directory to root

Discussion in 'General Discussion' started by ctbhost, Jul 26, 2004.

  1. ctbhost

    ctbhost Well-Known Member

    Joined:
    May 31, 2002
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    ok first thing is i am a dill :eek:
    i was meaning to chown the /var/backup/ folder to root

    but instead i did the whole /var/ and all sub directories to root

    what is the best way to rectify this - without using a big hammer :)

    thanks
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You would need to look at the various ownerships on another server to compare and change them all back manually.

    As far as I know, it's either a manual repair job or a reinstall.
     
  3. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    Do you have another server to compare with?

    If so, you could start with a command like this

    cd /var
    find . -ls | awk '{printf "chown %s:%s %s\n",$5,$6,$11}' > /tmp/mychown

    this will create a file in /tmp called mychown that has lines like

    chown root:root ./cpanel/zonetemplates/simple

    The file will be based on your other servers ownerships
     
  4. ctbhost

    ctbhost Well-Known Member

    Joined:
    May 31, 2002
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    a decided to reinstall

    but thanks for your assistance
     
Loading...

Share This Page