Can't change files, because owner = 0

Scr33x0r

Registered
Apr 8, 2005
4
0
151
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.
 

Scr33x0r

Registered
Apr 8, 2005
4
0
151
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" ???
 

richu

Registered
Jul 14, 2007
4
0
51
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
 

cpanelinfoseeker

Well-Known Member
Oct 25, 2002
323
3
168
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
 
Last edited: