5 Replies Latest reply: May 11, 2011 7:27 PM by Topher Kessler
uwes98 Level 1 (0 points)

I was removing an old Matlab install and instead of clearing out  ~/etc I mistakenly removed /etc. Now Terminal (and heaven knows what else) are not functional. One solution I saw to the error message I received (something about setting an invalid owner) was to repair permissions...so that's running while I'm at work.


Just curious what else I might need to do. I think someone else at work is running 10.6 so I wonder if simply copying his /etc and plopping it onto my system will work.




iMac, Mac OS X (10.6.7)
  • edclange Level 3 (910 points)

    /etc is included in your Time Machine backup.  You'll probably need to boot from a Snow Leopard DVD in order to restore it.  I'm surprised your machine is still running at all without an /etc directory.  If you don't have a backup, then you're doing it wrong, and you need to start maintaining a backup.


    Copying /etc from another machine will probably make things worse.  A lot of stuff that's specific to your machine (such as user account and password information) is stored in /etc.  If you don't have a backup, and if all of your important data is stored in your home folder, you can attach your iMac to another Mac using Target Disk Mode and copy your entire home folder to the other Mac.  Then reinstall Snow Leopard on your iMac and copy your home folder back.

  • uwes98 Level 1 (0 points)

    Thanks for the reply. I do have a backup from a couple days ago. We'll see how it goes.



  • Topher Kessler Level 6 (9,865 points)

    Most of the items in the /etc folder will not be regularly updated, so a restore from a couple of days ago should be just fine unless in that time you performed some major system configuration changes.

  • uwes98 Level 1 (0 points)

    I didn't even need to restore. I just entered time machine and copied the most recent archived /etc into the root directory. Terminal immediately started working.


    The only trick was that since /etc folders are hidden in the finder, I needed to use the "go to folder" command and enter the entire path to the backed-up /etc.


    Worked great though.  Thanks for the kind responses.

  • Topher Kessler Level 6 (9,865 points)

    Glad it worked, as it should for a single-account setup; however, copying directly in the Finder like that may change ownership and permissions for some items. Using the restore feature of Time Machine will preserve these file attributes, though in this case its clear that using Time Machine would have been difficult without knowing how to have it target hidden files.


    You might consider running a Permissions Fix routine with Disk Utility to restore the default ownership and permissions attributes to the /etc folder and its contents.