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.

Can't change files, because owner = 0

Discussion in 'General Discussion' started by Scr33x0r, Jan 14, 2008.

  1. Scr33x0r

    Scr33x0r Registered

    Joined:
    Apr 8, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hey,

    I copied some old accounts from another server to our new cpanel server, but i cant change files because the owner is 0. How can I reset the ownership in a simple way?

    thanks.
     
  2. Scr33x0r

    Scr33x0r Registered

    Joined:
    Apr 8, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    It seems chown -R works but I first have to find out a user ID of a certaing user. Isnt there a way like DirectAdmin where you can "Reset Ownership" ???
     
  3. richu

    richu Registered

    Joined:
    Jul 14, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    india
    Hello,

    You will get this information for 3rd and fourth field of /etc/passwd.
    richu:x:538:539::/home/sarat:/bin/bash
    username:password:userid:groupid:home direcotry:shell
     
  4. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    324
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    Change the 3 "$user" fields below to the username and run in ssh (as root) to change the complete user directory.

    chown -R $user.$user /home/$user/public_html/*

    It will associate the gid and uid numbers based on the username.
    Hope this helps,
    Ron
     
    #4 cpanelinfoseeker, Jan 19, 2008
    Last edited: Jan 19, 2008
Loading...

Share This Page