Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

deleted /etc

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.


Thanks

-Matt

iMac, Mac OS X (10.6.7)

Posted on May 11, 2011 5:34 AM

Reply
Question marked as Best reply

Posted on May 11, 2011 6:44 AM

/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.

5 replies
Question marked as Best reply

May 11, 2011 6:44 AM in response to uwes98

/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.

May 11, 2011 6:51 PM in response to Topher Kessler

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.

May 11, 2011 7:27 PM in response to uwes98

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.

deleted /etc

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.