Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Easily set permissions on a migrated Home folder System
Situation: Copying your user's existing Home folder onto a new system.

Problem: You want to ensure all the permsisisons are set properly along with the UIDs.

Solution:
  1. Copy the folder from the old machine onto the new machine, into the /Users directory.
  2. Using the Accounts perferences window on the new machine, add a new account. When you do so, make sure the short name on the account is the same as the directory name you copied over. OS X will then 'see' the existing folder and ask you if you want to use that folder, or if you want to overwrite it. Select the option for keeping your existing folder, and OS X will set all the correct UIDs and permissions as necessary.
[robg adds: This seems like a very useful trick when migrating user data ... perhaps I'll test it when I win the lottery and order that new Quad!]
    •    
  • Currently 2.75 / 5
  You rated: 5 / 5 (4 votes cast)
 
[9,484 views]  

Easily set permissions on a migrated Home folder | 9 comments | Create New Account
Click here to return to the 'Easily set permissions on a migrated Home folder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily set permissions on a migrated Home folder
Authored by: rhowell on Oct 31, '05 06:39:42AM

I love it when people test things and report their results to the community. That makes this a nice hint.

Now, is "Anonymous" willing to test what happens when the UID/GID of the imported home folder already exists for another user on the destination system?



[ Reply to This | # ]
Easily set permissions on a migrated Home folder
Authored by: Gerk on Oct 31, '05 12:15:32PM

exactly. UID/GID is much more important in the grand scheme of things.



[ Reply to This | # ]
Easily set permissions on a migrated Home folder
Authored by: claudio on Oct 31, '05 01:29:43PM

Well there are a few things to be aware of:
1. The users short name does not exist on the target machine (otherwise you would obviously overwrite an existing homefolder)
2. If there is another user having the same UID, then the copied folder could be read/write by this user (if he knows that this folder exists, otherwise he won't care of). By the time you create a new user with the same short name as the copied folder, then this new user gets a new UID on this system. But as Anonymous mentioned OS X is smart enough too see, that there is a conflict ans solves it without any hassles giving the existing folder the correct user permissions.

Regards,
Claudio

---
- claudio



[ Reply to This | # ]
Easily set permissions on a migrated Home folder
Authored by: galaher on Oct 31, '05 08:46:42AM

Don't forget that "Migration Assistant" may also help with this if your machines support "Target Disk Mode". Not all machines do, so this is a nice hint. But depending on the circumstances, looking into and using Migration Assistant might be another good alternative.



[ Reply to This | # ]
Easily set permissions on a migrated Home folder
Authored by: gshenaut on Oct 31, '05 01:28:46PM
Another nice way to do this is once you've set up the directory named "user" (i.e., the new user's login name) and the new account, do the following in the shell
cd /Users
sudo chown -R user:group user
where "user:group" are the names of the new user and the new user's group. This is also useful if you have changed a user's UID and/or default GID. If the user and group have the same name (recommended), you can use the euphonious "chown -R user:user user".

Greg Shenaut

[ Reply to This | # ]

Easily set permissions on a migrated Home folder
Authored by: alternapop on Nov 04, '05 08:49:03AM

you may have to use chmod as well



[ Reply to This | # ]
Easily set permissions on a migrated Home folder
Authored by: imageworx on Oct 31, '05 01:51:55PM

This is a hint? I've done this before and never knew it was special. :)

I used a firewire drive with an image mounted of my old drive, then Migration assistant AFTER I reset the user and created new with old name (gotta write it down exactly). It even asked if I wanted to replace the existing user/home.

Rebuilt perms, ran cache cleaner, and all is fine. now 10.4.3 is out..woot!

(Rob, I got a good deal on a Dual 2.5...wait for the Wintel boxes...they will be faster!)

---
To BeOS or Not to BeOS



[ Reply to This | # ]
Anyone know if this works...
Authored by: phillymjs on Oct 31, '05 04:02:35PM

...in a similar fashion when you change from local authentication to authenticating via, e.g., Active Directory using the same shortname?

~Philly

---
--
Ohhh, WHY did I register with Insta-Trace???



[ Reply to This | # ]
Easily set permissions on a migrated Home folder
Authored by: alternapop on Nov 04, '05 08:54:37AM

I think there is a bug with this method with 10.4.2. The user's Documents folder was still totally readable by me and had the wrong permissions while all of the other folders within the home folder seemed correct. After upgrading to 10.4.3 I haven't seen this same bug.



[ Reply to This | # ]