-1

This question already has an answer here:

accidently I did "chown -R www-data:www-data /" (I wanted to chown current directory).

Is the only good way now to set the system up again from beginning?

waaaah -.-

Thanks

marked as duplicate by Michael Hampton Jul 7 '14 at 16:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Reinstalling will certainly be the fastest way to recover. Related: Why is “chmod -R 777 /” destructive? – Michael Hampton Jul 7 '14 at 16:07
  • This appears to be a dup of serverfault.com/questions/105957/… . Your question doesn't really have enough info to answer the question. Which OS and/or distro are you running. RPM and .deb based distributions usually have a data base that contains information about all the files, ownership and permissions. Solaris exposes this information in text files. Source based distros or systems with many manually installed packages may be a bit more challenging. – Rik Schneider Jul 7 '14 at 16:15
0

In a world of total automation, it is so much easier to replace something that's broken than to try to fix it. That's why you just buy a new toaster when the old one's broken -- more cost effective that way.

It's a hard situation, but in the future, I'd use a configuration management tool like salt or puppet. That way, if your server goes down or an accident like this happens, you can just tell salt or puppet to reinstall from the beginning, and -- poof! -- you have your old server back, with all its custom config and files in place where they should be. replace your old toaster with one fresh off the assembly line.

Not the answer you're looking for? Browse other questions tagged or ask your own question.