martynh

Active Member
Oct 6, 2009
32
0
56
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
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
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.
 

martynh

Active Member
Oct 6, 2009
32
0
56
that script didnt do anything and when I go to manually chown the accounts nothing happens... god im screwd
 

Vinu007

Member
Aug 9, 2006
22
0
151
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
 

martynh

Active Member
Oct 6, 2009
32
0
56
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
 

martynh

Active Member
Oct 6, 2009
32
0
56
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