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

How to set all file permissions to default?

So a few background notes are in order. I came across an article on the NSA's website titled Hardening Tips for Mac OS x 10.6 "Snow Leopard", needless to say I have come to believe I have made this irreversible. The NSA suggested to do some fancy command line coding to disable this, modify that, and change permissions to this. After hours spent on "hardening" my system, I have little hair left to pull in frustration. Is there any way to restore all file permissions back to default? I have used the Repair Disk Permissions, but that has done very little. To give the scope of what permissions have been skewed, I have observed several things:


  1. The desktop wallpapers, on all Desktops (as I'm in Lion 10.7.3), start from the same picture every time. I have the wallpapers changing, randomly, every 5 minutes.
  2. Safari doesn't keep the home page. No matter how often I try to change the homepage, I restart Safari, and I'm right back to the original homepage.
  3. Firefox doesn't retain the fact that I want it to be the default Web Browser. In fact, it keeps "forgetting" that I've used it before, and thus brings me to their awesome start page whenever someone first uses Firefox.
  4. Spotlight gets "stuck" i.e. almost every time I start my machine, it indexes. Even after I let it finish indexing, the next time I start my computer, it starts again.
  5. I have to input the administrator password after almost every activity, such as copying to the desktop, moving an application not bought from the Mac App Store into the /Applications folder, deleting a file from anywhere inside my home folder, etc.
  6. Some preference panes that need access to certain folders, such as Hazel's access to my desktop, are denied that access without ever prompting me for a password (though even if it did, it would get rather annoying after every startup)
  7. My firewall (in System Preferences>Security & Privacy>Firewall) doesn't "remember" that I do indeed want Dropbox to accept incoming connections. I have to input my admin password at each startup after clicking "allow"
  8. Opera pretty much doesn't function. Its bookmarking capability, home page, saved tabs, any thing that requires the saving of any type of preference to the computer results in a dialog pop up informing me that Opera failed to save what it needed, and prompts me to "Try again" or "Cancel" (hint: the "Try again" button doesn't work)


There are more symptoms of an ever growing problem.


I have backed up my machine from Time Machine, but I think it retains these file permissions, unless I'm wrong.


Summary:

How can I fully restore EVERY file permission back to default? Repair Disk Permissions doesn't work

Is there a way that I can re-install Mac OS X, restore through Time Machine, and achieve the default file permissions, essentially losing all file permissions?

MacBook Pro (15-inch Early 2011), Mac OS X (10.7.3)

Posted on Feb 22, 2012 10:45 AM

Reply
22 replies

Feb 22, 2012 11:56 AM in response to gumsie

I cloned Mac OS X with Carbon Copy Cloner, and then reset the home directory file permissions. However, all problems listed above unfortunately still exist. For example, I'm still having to input a password to delete anything from the Desktop. I never knew that existed, so thank you, I will definitely keep note of that cool utility. But that unfortunately did not correct my problems 😕

I retried verifying disk and repairing disk permissions with no luck. Any other suggestions, before I try to blow up my computer with install discs and Migration Assistant?

Feb 22, 2012 12:02 PM in response to SeeYa32

Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.


Launch the Terminal application by entering the first few letters of its name into a Spotlight search. Drag or copy – do not type – the following line into the window, then press return:


chmod -R -N ~


If you get an error message about permissions, enter this:


sudo !!


You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.


Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.


When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.


In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens.


Select your boot volume if not already selected.


Select your username from the menu labeled Select the user account if not already selected.


Under Reset Home Directory Permissions and ACLs, click the Reset button.


Select ▹ Restart from the menu bar.

Feb 22, 2012 12:13 PM in response to Linc Davis

I inputted the commands you suggested, and only received these errors (even after sudo-ing it):


chmod: Failed to clear ACL on file S.gpg-agent: Invalid argument

chmod: Failed to clear ACL on file Commands: Invalid argument

chmod: Failed to clear ACL on file Notification: Invalid argument

chmod: Failed to clear ACL on file lastpasscrplugin: Invalid argument

chmod: Failed to clear ACL on file lastpassffplugin: Invalid argument

chmod: Failed to clear ACL on file ubiquity.socket: Invalid argument


I have already reset the Home Directory permissions, but that seems to not get rid of the problems I've been having. Also, I'm a little wary about completely re-installing Mac OS X and restoring with Time Machine, because doesn't Time Machine restore System file permissions as well as Home Directory file permissions?

Feb 22, 2012 12:23 PM in response to gumsie

gumsie wrote:


................. Also, I'm a little wary about completely re-installing Mac OS X and restoring with Time Machine, because doesn't Time Machine restore System file permissions as well as Home Directory file permissions?

If you have a clone will you even be using Time Machine?

I have both a clone and Time Machine. I have neither a clone or a Time Machine backup of before I decided to screw up my system.

Feb 22, 2012 12:25 PM in response to SeeYa32

SeeYa32 wrote:


gumsie wrote:


................. Also, I'm a little wary about completely re-installing Mac OS X and restoring with Time Machine, because doesn't Time Machine restore System file permissions as well as Home Directory file permissions?

If you have a clone will you even be using Time Machine?

I have both a clone and Time Machine. I have neither a clone or a Time Machine backup of before I decided to screw up my system.

I suspected as much. I just wanted you to be in a position no worse than you are now.

Feb 22, 2012 12:43 PM in response to Linc Davis

Gah! I must have really screwed up my system...Unfortunately, Linc Davis, that did not work either. I received the same error messages in Terminal, and I still have the same problems after I re-did the resetting of the Home Directory permissions via the Recovery Partition.


Perhaps I can give a little more information, hopefully this helps. Just recently, Google Chrome has been crashing on startup. I know this isn't a problem with the actual application itself because other applications have been crashing and giving the same error in log.



Process:         Google Chrome [1259]

Path:            /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Identifier:      com.google.Chrome

Version:         16.0.912.77 (912.77)

Code Type:       X86 (Native)

Parent Process:  launchd [267]

 

 

Date/Time:       2012-02-22 13:03:45.806 -0600

OS Version:      Mac OS X 10.7.3 (11D50b)

Report Version:  9

 

 

Crashed Thread:  0  CrBrowserMain  Dispatch queue: com.apple.main-thread

 

 

Exception Type:  EXC_BAD_ACCESS (SIGBUS)

Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000008c





Other applications give the same Exception Type error. For instance, Hazel gives me a "Insufficient access privileges for operation" message, even after doing everything suggested in this post. Hope this helps

Feb 22, 2012 12:53 PM in response to SeeYa32

You must have wrecked the permissions of all your third-party software, caches, everything. That won't be fixed by Disk Utility. Boot from your recovery partition, erase the boot volume, and do a full-system restore from the last Time Machine snapshot taken before the disaster.


Next time you want to play "Mad Scientist," make a copy of your boot volume on another drive and experiment on that.

Feb 22, 2012 12:57 PM in response to Linc Davis

I most definitely will make a good, solid copy of my disk before I achieve being more mad than a scientist 😉. I appreciate the help Linc.


I do have one more question, for those terminal savvy users. Is there a way to copy files from one location to another, without retaining the wrecked ruined customized file permissions? Or otherwise having just default permissions when a file is downloaded?

How to set all file permissions to default?

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