Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Mac OS X 10.7. Today I created a new user account, and moved everything under my own user account to my new one, and did a command:

sudo chown -R [new_user_name] /Applications
sudo chown -R [new_user_name] [old_documents's_directory]

Then I found that lots of program having error in running. For example, my XAMPP simply cannot load the phpmyadmin page (this got resolved after I reinstall XAMPP). I think this is the problem with user permission: when I did the "chown -R", I also changed the program-owned-file to be under my username.

But I don't want to reinstall all the program I have. Is there a way to know the old owner of my program-owned-file so that I can change them back?

Thanks :)

share|improve this question

migrated from stackoverflow.com Jul 16 '12 at 15:35

This question came from our site for professional and enthusiast programmers.

1  
How is Linux related to your question? –  Emil Vikström Jul 16 '12 at 15:21
    
Look in your pre-chown backup. You have one, right? –  chepner Jul 16 '12 at 15:23
    
Knowing your old owner without backup is probably impossible. But you probably don't have so many specific application defined users and groups so you can do it manually when you see a problem. –  dystroy Jul 16 '12 at 15:25
    
@EmilVikström:Err... probably I should put Unix tag? cuz I think linux user would know how to solve the problem; –  songyy Jul 16 '12 at 15:30
    
@chepner: Thanks for the reply... Sadly I don't have any backup.. –  songyy Jul 16 '12 at 15:30
add comment

1 Answer

up vote 1 down vote accepted

Well, what you did wasn't particularly good. Files for some apps in /Applications can be owned by root, and if you installed some applications with a guided installer (like through a .pkg), that would be a good hint. Also, all OS X system programs are owned by root, like Mail, iTunes, et cetera.

  • If you can, restore from a backup.

  • If you don't have a backup, try repairing your volume's permissions through Disk Utility.app. This might restore permissions for some applications and their files.

  • If that doesn't help, try reinstalling those programs you have an installer for.

  • Finally, create a Time Machine backup, then reinstall Mac OS X and selectively migrate data back from that backup through Migration Assistant. This might work for user-installed apps.

  • You can also use Carbon Copy Cloner to create the backup and just pull the documents from that – CCC won't work with Migration Assistant.

share|improve this answer
1  
The Repair Permissions might work quite well. I'd be interested to hear what the result is. –  user3463 Jul 16 '12 at 20:17
1  
Needless to say: Never use sudo unless you're really sure what you're doing. –  slhck Jul 16 '12 at 20:17
    
Completely agree. –  user3463 Jul 16 '12 at 20:19
    
@RandolphWest: I tried Repair Permission, seems working quite well :) –  songyy Jul 17 '12 at 0:59
    
You're lucky. Don't do that again! –  user3463 Jul 17 '12 at 1:02
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.