Consistent UIDs may solve file transfer issues

Oct 26, '05 06:33:00AM

Contributed by: rmuir

I have several machines that I routinely transfer files between. After a rebuild of a PowerBook, I was unable to upload files successfully (but I could download files without issue.) The error indicated that I did not have permissions to upload. I spent a lot of time looking at owner, group and other settings between the machines, all to no avail...

Then, I realized that in the rebuild of the PowerBook, I had created a "testuser" account first, and then constructed my usual user (we'll call it "user") account. This meant that testuser had a User ID (UID) of 501, and my user account had a UID of 502. This, apparently, was a the root of my problem when transferring files between my PowerBook and all my other machines (all of which had a UID of 501 for my user accounts).

The solution, for me, was to use NetInfo Manager, found in /Applications -> Utilities:

  1. Logout as my usual user.
  2. Login using my "Administrator" account.
  3. Launch NetInfo Manager, and unlock it with my admin password.
  4. Select users, select "testuser" and change the value of the UID to 502.
  5. Select users, select my "user" account and change the UID to 501.
  6. Save the changes and quit.
Then, from the Terminal, recursively change the ownership of the contents of each of the account's Home directories to their newly assigned UIDs:
% cd /Users
% sudo su -
% chown -R testuser testuser
% chown -R user user
After logging back in as "user," I have had no problems with network file exchanges between these various machines. It seems that keeping UIDs consistent between peers on a network may solve some annoyances!

[robg adds: I can't really test this one, so I'd welcome any comments on the subject of UID differences causing issues between machines on the same net...]

Comments (22)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20051022175850619