Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

My issue is that I've seriously busted all of the owners and permissions on my user folder and subfolders and it's causing lots of issues using lots of applications.

The initial cause was that I had renamed a user by following the Apple support instructions at http://support.apple.com/kb/HT1428

After the new user was set up, Mozy backup wouldn't backup any more and lots of my applications couldn't update themselves automatically. The application usually started working again if I deleted the offending program and reinstalled it. I thought it was because the permissions were wrong and I found some places where GetInfo indicated that permissions were referencing the old user. Sometimes the dialog just said "Fetching" for the username and never updated to anything else.

I ran Onyx "fix permissions" and Disk Utility "Repair Permissions" with no results. With "Repair Permissions", it keeps throwing some info warnings about unexpected ACLs, but the info I could find online didn't think those would be causing issues like this.

I tried to recursively run some command line scripts on the user folders (both logged in as root and using sudo). chmod got lots of errors about the owner of the files being wrong. chown after that gave me other errors (I can't remember exactly what they were). In a fit of panic, I right-clicked the entire user folder and chose to apply it's permissions to all children.

From what I can tell, when I did that, I set everything to Read&Write for that user and Read-Only for "everyone" and "staff". Now, I'm worse off than before. Firefox crashed and it can't even update it's own settings so it brings up the "Do you want to restore these tabs" every single time it launches, even after repeatedly saying "Start New Session".

Basically, everything in my user folder is broken with regards to owner and permissions and I need to know what they are supposed to be. Who is the owner of the files in each directory supposed to be (Downloads, Applications, etc.) and what should the permissions be? Given those permissions and owners, what is the best way to go about setting those all right?

I saw a question similar to this at Resetting user permissions to their default mode but it only addresses permissions, not owners, which has been an issue already.

I'm not sure if reinstalling Lion over the copy I have right now would fix anything and I'm close to calling Apple Support if I can't figure anything out in the next few days. Thanks for any help.

share|improve this question
    
Have you at least figured out how this happened? What specifically is wrong? ACL, metadata or the traditional UNIX permissions. It's hard to cover everything in one answer - especially resetting the immutable bits if needed. –  bmike Mar 8 '12 at 17:39
    
And to make the troubleshooting easier, I would install the OS onto an external drive, boot from that and mount your "problem" drive to ignore permissions and see if rsync or something will let you get the files into a cleaner state. Then you could delete the user and copy things back in - respecting the new user's ACL and permissions on the folders in ~ - careful to move the contents of ~/Library/ and not ~/Library itself. –  bmike Mar 8 '12 at 17:41
    
I'm not sure other than what I typed above. I appreciate the suggestions but I'm not much of a power user. If it's more complicated than a few command line or utilities, I'm just going to give up and restore from a Time Machine backup. –  cisellis Mar 9 '12 at 15:20
    
Good plan. You can get help from a technician if needed once your backup is restored - usually you can then have a short list of things that are out-dated or missing. I'm glad you have a backup :-) –  bmike Mar 9 '12 at 16:25
add comment

3 Answers

Your issues are basically the same. There is no standard for permissions for files in your home directory they all depend on their use.

Fixing permissions apps and scripts and OS installs should not affect the user area at all except maybe changing the permissions on the home directory. OS installs and most fix permissions scripts compare the permissions and owners to what is required for a clean install and this has no normal users. If they did I would consider this as a major bug.

The fix is to change the owner of the files ie use of chown on your home directory. The owner should be the new owner name.

There is no general way of getting permissions back as individual files depend on there application and all apps can be different.

Thus the only way is to restore from a backup before the change - do the change as per Apples notes and then chown all the files. Or look at each individual file and work out what permissions it should have - for most files your home directory this should be read/write for the owner and nothing (or read only ) for others. Directories will also need execute permission so that they can be listed. Applications will need other permissions.

share|improve this answer
add comment

The first step I would recommend is to try resetting your home folder permissions with the Reset Password utility in Lion Recovery. (Despite the name of the utility, you won't actually be resetting any passwords.)

Resetting the home folder permissions with the Reset Password utility will reset both the owner and the permissions.

  1. Restart your Mac holding +R to boot into Lion Recovery, which will bring you to the Repair Utilities screen.

  2. Open Terminal from the Utilities menu.

  3. In Terminal, enter resetpassword to open the Reset Password utility.

  4. Choose your hard drive icon at the top, then choose your user from the drop-down menu below. Do not reset the password here.

  5. At the bottom of the window, under "Reset Home Directory Permissions and ACLs", click the "Reset" button. This may take awhile if you have a lot of files in your home folder.

This should solve your permissions problems for most apps. However, it's possible you may have a few apps which had saved files with special permissions that are different from the user's default permissions (like preferences or application support files). For those apps, you may need to delete their preferences or reinstall the app.

If resetting your home folder permissions doesn't work, then you may need to try restoring from a backup or transferring your data to an external drive.

share|improve this answer
    
I'm trying this right now. So far it's been running for about 12 hours. I have a lot of files :P –  cisellis Mar 9 '12 at 15:19
    
This did not work. The operation ran for over 48 hours before I gave up and turned it off. It may have finished at some point but there was no way to tell. –  cisellis Mar 12 '12 at 15:05
add comment
up vote 0 down vote accepted

I'm adding a single answer to address everything. Whatever I did with the permissions, it was totally borked. I tried the first answer, booting into Recovery Mode and resetting the permissions via the reset password method, but that ran for 48 hours before I killed it and had no discernable effect. I tried to restore from Time Machine and that actually blew up as well and was unable to restore the backup.

I ended up backing everything up manually to an external disk, formatting the entire disk and reinstalling Lion, reinstalling everything manually, and copying my personal data, such as the iPhoto library and iTunes libraries, back manually. iPhoto had to repair the library but worked fine and I've had no issues. iTunes was unable to add any music to the library until I used Disk Utility to repair permissions again. Since I only copied the iTunes Media directory and not the parent directory, it seemed to fix everything.

Moral of the story: Forget Apple, don't rename users.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.