Changed permissions on "System" Directory!!

macscience

Registered
HELP! Reset Permissions on "System" directory

I know this is stupid but....

I accidently changed permissions on the "System" directory and all sub directories to "none" using the Super Get Info app. Right after the change - no apps will launch and I cannot change the permissions back. OS X freaked out and the finder quit. I tried to reboot and nothing... it won't get past the smiling Mac icon. I restarted in OS9 and that is where I am now. Does anyone know how to fix this? How can I fix the permissions on the "System" directory??

What are the commands I need to use in the "Single User Mode" to do this??

Help!
 
You should be able to simply reinstall on top of your existing OS X, as long as you make sure to also reinstall all the updates since 10.1. Although Apple advises against this, I know people who have done it with no (apparent) ill effects.
 
Wait! Wait! I have another suggestion before you go reinstalling!

Go here: http://homepage.mac.com/simx/.cv/simx/Public/chkstuff115.sit-binhex.hqx

It'll download a command-line utility that will help you set permissions back to what they originally were.

Here's a perl script that was advertised on MacFixIt.com a week or so ago, that resets all default installed files to their original permissions. Obviously, this script can become VERY handy, and I suppose that it could be very useful in your situation. This perl script actually examines log files in the installers and sets permissions to what they should be.

I did not create this script, but I'm providing it as a download from my iDisk. Here's the URL:

http://homepage.mac.com/simx/.cv/simx/Public/chkstuff115.sit-binhex.hqx

This script has been updated for OS X 10.1.3, but when a new version of Mac OS X comes out, I would advise you to wait to run it until chkstuff gets updated for that version of the operating system.

Once you download it, open the folder "chkstuff115". Then open the Terminal application (/Applications/Utilities/Terminal). Now, once the Terminal finishes opening, type "sudo " with the trailing space. Now drag the file "chkUGM" from the Finder window to the Terminal window. Then press return. The Terminal should ask for your password. This is a completely safe script, and it actually does not modify anything at this point. It will just create a command file that shows discrepancies in permissions. So type in your password and press return (note nothing will show up when you type your password for security reasons). It will start doing its stuff.

Once it's done (you'll see the prompt again, which in my case is: [a0c3:~] simsimbean%), it will have created a temporary file that is the command file to change permissions back to the default. First, you may want to examine the discrepancies. To do this, type the command more /tmp/fixUGM.sh in the terminal. Press return, and you can examine the commands that this file will execute -- incidentally, the path to each file that has incorrect permissions is listed, so you can see exactly which files are modified. You can advance the displaying either by pressing space (which will advance the file by one page) or by pressing return (which will advance the file by one line). It should tell you how far through the file you are by the bottom line of the terminal window, which shows you the percentage of the file you have already viewed.

There will also be a file called "missing_files.txt" which tells you which files you are missing from the default installation of Mac OS X. You can also use the command more /tmp/missing_files.txt to see what files you are missing. This might not be a problem, but it's just some nice info.

If you are satisfied with the files it has listed, you can go ahead and run this script. Simply type the command cd /tmp; sudo ./fixUGM.sh, all on one line, and press return. It will again ask you for your password. Once you give the terminal your password and press return, it will start modifying the files to their original permissions. It will notify you when it's done.
 
Is it just me, or does Disk First Aid have a scary acronym?

Disk First Aid => DFA => Death From Above...?
 
Originally posted by macscience
How do I use this if I cannot startup normally?
I can only startup in single user mode or in OS 9...

You should still be able to use it. Just start up in OS 9, download it, and put it at the root level of your OS X partition/drive. That way it will be easy to find.

Then start up in OS X in single user mode, and follow the steps that I outlined.

Assuming that you put the "chkstuff115" folder at the root level of your OS X partition, you would do these commands in single user mode:

1. First, do the command "sudo /chkstuff115/chkUGM". It should ask for your password and make the command file.

2. Then you can do the "cd /tmp; sudo ./fixUGM.sh" command. Of course, you can always do the "more /tmp/fixUGM.sh" first, to see what's going to be changed.

Hope this helps!
 
Back
Top