Author Topic: Changing owner/permissions  (Read 4578 times)

Offline krissel

  • Administrator
  • TS Addict
  • *****
  • Posts: 14735
    • View Profile
Changing owner/permissions
« on: December 13, 2007, 07:42:51 AM »
I migrated Panther files to a fresh Tiger install. Immediately rebooted to the newly moved user which had all my user info. Now I encounter many files that are reported as belonging to the Tiger account even though they were created on the Panther volumes and many exist on separate volumes. I believe this happened because the Tiger account is 501 and those other files were also created by 501 albeit while in Panther.

Moved user account is now 502 since it was technically the second account created within the Tiger install. Since this is causing a lot of problems with using files/folder and may be a problem with backups, I would like to consolidate all 501 and 502 files/folders to one account and delete the other. The 502 account is the one I want to use. Will it present any problems wince 501 is usually the primary account? If not, could you help me with the proper commands to do so? Or would just deleting the 501 account do the trick without orphaning the files and folder and making them unusable? If I can combine to 502, could I then delete the 501 and change 502 to 501?

I came across the following suggestions in similar thread  at another forum but not sure which might be the correct way.
--------
QUOTE
So for example, if the old account was 'tommy' and the new account is 'thomas', then create thomas, and while still in another account copy the files from /Users/tommy to /Users/thomas, then give the command

sudo chown -R thomas:thomas /Users/thomas

The 'thomas:thomas' means it will change both user AND group. The '-R' means it will change everything inside the directory that the command points at--in this case /Users/thomas.


OR

QUOTE
I just wanted to finish up this thread. 1st of all, Trevor, thnx 4 all your help. In the end I used:
sudo niutil -createprop . /users/userName uid 501
to change his UID to 501. Then:
sudo find / -user UID -exec chown userName {} \;
to search out files created by my buddy & other admin accounts & change the ownership to him. My friend had files he created coming up owned by UID 501, 503, & 504. Strange...
I tried this in the begining of my troubleshooting & it didn't help. I got advice from a few forums & combined suggestions, tired a few things & eventually things were @ the point the ownership changes stuck.


Please note I am not all that comfortable in the Terminal so I need explicit instructions.

thanx.gif



A Techsurvivors founder

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
Changing owner/permissions
« Reply #1 on: December 13, 2007, 10:05:31 AM »
QUOTE
Please note I am not all that comfortable in the Terminal
Nor am I, that's why I always take a friend with me when I visit the bus station...tongue.gif

You're way over my head with this quest! Only thing I would suggest is asking for help in some of those 'geek' forums. Just be prepared for some less than extensive suggestions until they understand your exact request. Then comes the dilemma of trying something suggested by someone you know absolutely nothing about! eek2.gif

Good luck and if you aren't completely blocked from using the new setup, let us know how it goes! If it all comes crashing down around you, I think you have some snail mail addresses of some of us! tongue.gif
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline krissel

  • Administrator
  • TS Addict
  • *****
  • Posts: 14735
    • View Profile
Changing owner/permissions
« Reply #2 on: December 13, 2007, 11:22:55 AM »
I have also posted on the Apple board and at OSXfaq.com.  The latter are pretty Geeky so I hope to get some help there.

Things are working OK, it's just that when I copy something to a partition it tells me that I don't have permission and have to authenticate. I disabled permissions on the data volumes but I don't want to do that on the boot partitions or it will screw things up royally.

Am in the process of doing some extra backups to externals.  smile.gif


A Techsurvivors founder

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
Changing owner/permissions
« Reply #3 on: December 13, 2007, 05:13:48 PM »
Every time I see a reference to Terminal I think of that old Parkay® commercial: "It's not nice to fool mother nature!" wink.gif

It's much more comforting to know exactly what each command and their arrangement in the statement means/does and the possible consequences of a miss-typed command. Backups are critical, of course, but I still wince when I see -rm in a line! eek2.gif

I fear that your particular problem is not that wide-spread and there may be simple if more inconvenient methods for getting Permissions back in line. Does removing a user not reset any/all Permissions for that user back to 501? Or do the files hang around with out-of-date 'ownership?' dntknw.gif
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline krissel

  • Administrator
  • TS Addict
  • *****
  • Posts: 14735
    • View Profile
Changing owner/permissions
« Reply #4 on: December 13, 2007, 07:31:53 PM »
That's what I'd like to know. If removing the one account will automatically make the files that were belonging to it now belong to admin or system then it would be OK. But I want to make sure they suddenly don't become unusable.


A Techsurvivors founder

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
Changing owner/permissions
« Reply #5 on: December 13, 2007, 08:21:23 PM »
OK, may be straying way off base but...

What happens to a file's Permissions that is moved (actually duplicated, I would think) to ones "Shared" directory? Does its 'owner' actually revert/change to something else? Or does it simply become RW to 'everyone'? Thinking.gif
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline krissel

  • Administrator
  • TS Addict
  • *****
  • Posts: 14735
    • View Profile
Changing owner/permissions
« Reply #6 on: December 16, 2007, 12:08:51 AM »
Well, having received no answers at Apple or the other site, I bit the bullet and deleted the extra account.

The files that belonged to it now have "unknown" as the owner. I guess I will just have to changed them individually if this presents problems somewhere down the line.

dry.gif


A Techsurvivors founder

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
Changing owner/permissions
« Reply #7 on: December 16, 2007, 02:51:48 PM »
What would happen with a 'simple' Permissions Repair? Probably nothing if DU doesn't recognize them as belonging to anybody, OTOH. Maybe just a "Verify" should indicate what might happen. A Terminal guru could probably provide a way to search for 'Owner=unknown' and change that to 501(?). dntknw.gif Matter of fact, I know AppleScript can run unix scripts/commands...Thinking.gif
« Last Edit: December 16, 2007, 02:52:50 PM by Xairbusdriver »
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline krissel

  • Administrator
  • TS Addict
  • *****
  • Posts: 14735
    • View Profile
Changing owner/permissions
« Reply #8 on: December 16, 2007, 09:47:15 PM »
That's what I had hoped for. I ran across some info (above) that suggested a way to transfer one user account to another but that's not exactly what I wanted to do. It was the odd files and folders across the volumes that had somehow acquired permissions related to that account.

After more research, I think what happened was that when I cloned the install of Tiger I was booted to that other account. Then when I cloned it, I think the target volume had the "Ignore Permissions on this drive" box checked. That makes files belong to whomever is logged in during the cloning. In this case, the other account.

Doing the Permission Repair via Disk Utility only repairs about 40% of permissions, mostly those relating to applications and system files. They really have little effect on files and folders that belong to accounts.

See what I've learned. smile.gif

Now if only I knew that before I did the cloning I could have avoided some of this. dry.gif
« Last Edit: December 16, 2007, 09:47:58 PM by krissel »


A Techsurvivors founder

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
Changing owner/permissions
« Reply #9 on: December 17, 2007, 11:52:55 AM »
QUOTE
if only I knew that before I did...
I think that's called "foresight!" I've seen it in others, have very little experience with it, personally! tongue.gif

Fortunately, the rest of us have also learned from your experience! clap.gif
« Last Edit: December 17, 2007, 11:53:31 AM by Xairbusdriver »
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes: