0

I accidentally run command chown -R paulie /usr/local (I needed to add some subfolders).

How can I get it back?

Now I already resolved problem with mysql data, but still have problems with gcc, for example.

  • /usr/local is all under your control so no defined way – user151019 Jan 31 '15 at 9:58
1

Assuming you only changed the owner (as your command states), you can return everything back to root ownership by

chown -R root /usr/local

If you think you may need to fix the group ownership too, then this is better

chown -R root:wheel /usr/local
  • yes, it is the only problem. But I am sure, root ownership for all is not the right solution. For example /usr/local/data/mysql should be owned by _mysql user. – DonPaulie Jan 31 '15 at 11:40
  • I see... My mysql is buried in /opt/ and all of the files in my /usr/local/ are owned by root; but, it depends on what other software you've installed, and how it was installed, etc. Short of restoring from backup, or browsing the backup to see what is not owned by root, there is no simple way to do that. – Kent Jan 31 '15 at 12:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .