Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Ditto command wont copy permissions

Hello All,
This is my first time so please be gentle...!!!! I trying to copy data from an old server (10.3.9) to a new one (10.4.3) using the Ditto command but it's not retaining the permissions. I'm doing this logged in as "root". Any help is greatly apprieciated..!!!
Thanks..Bob

X Serve G5, Mac OS X (10.4.3)

Posted on Apr 24, 2006 12:48 PM

Reply
26 replies

Apr 25, 2006 4:57 AM in response to baltwo

The servers are both on the same Ethernet subnet, both get IPs from a Windows DHCP server(actually client reservations) They are not part of our Winodws Active Directory. On the new server I have mounted a volume to the folder (from the old server) that I want to copy. Does that help..???
I'm not sure I know what the "drag and drop" is about...? Is that the same thing as the Windows function? Will this retain permissions? Thanks for your help...!!!!!

Apr 25, 2006 8:22 AM in response to hyphen

How much time do you have? It's about 18 to 20 users and 180GB of data. All the data within their "Home" directories is what I'm trying to copy/move to the new server. Here's an example....existing path is something like "/Users/Brian/Public/Drop Box/" within here is were is gets bad. Brian is the "Owner" on only a couple of the folders, then some of the other users, more then one of them, have ownership of the other folders. And there is also different "groups" assigned to various folders in here as well. It just doesn't seem right to me but maybe that's becasue I'm a Windows guy...Why do other people have access to other users home folder?
This is why I want some way of transferring over all the permissions that go with all the folders. This will take me forever to re-create the way it is currently. I hope that I explained that OK for everyone...Thanks...!!!!

Apr 26, 2006 6:19 AM in response to hyphen

Yes, I imported them first, both User accounts and the groups. Is there some type of Mac "Service" that I need to startup to get this to work? I'm not sure I want to do that because the old server is still on-line and the users still need access to it. I don't wont to run into any problems were their workstations don't know what server to use to login to....

Do you think it all has to do with the way I use the Ditto command?

I heard from another person that I might be able to use SHH to get what I need...I never used it before but...I'm willing to try anything. I haven't heard back from them yet though.
Thanks...!!!!!

Apr 26, 2006 7:04 AM in response to bbauer

bbauer

Are you cpopying the files onto the users' respective home directories? Ditto by default copies the files along with resource forks and permissions (cp, the "other" command line copying utility, traditionally, used to strip the resource fork from a file but with Tiger, as far as I know, it was updated to work with them) so, unless you have specified for it not to I cannot see anything wrong with its use (speculation). I can speculate even further and suggest that it could be the way the new accounts are set up that is causing this to occur. Still it is a bit strange that particular home folders in that set up contain files owned by different users.

I'll ask for some more advice on this and get back to you.

Apr 26, 2006 9:07 AM in response to bbauer

bbauer
Do you think it all has to do with the way I use the Ditto command?
Well, if you post how you are presently using it, we might be able to answer.
"Ignore Ownership on this Volume" is NOT enabled. (No check mark) Is that right?
Yes, that is how you need it.

I think you need to give more detail on what exactly you are trying to do, or you may find user "john"'s files owned by "tom", "tom"'s files owned by "ben" and so on. The users need to have the same UID on new and old machines.

Apr 26, 2006 10:16 AM in response to Michael Conniff

Hi Michael, OK..I'll try my best...
On the new server I mount a volume called "Users" from the old server. Again, on the new server I open up Terminal.
Then I login as "root". Sorry, I know it's risky....The I type *ditto -V -rsrc "/Volumes/Users" "/Volumes/G5 Subsystem/Users" The copy works fine, the Owner is set as "admin" and the group is "unknown", this is on all the files and folders. I am not overwriting any files or folders. The users and groups were imported from the old server. Is the "UID" the same as the ID that you see in the Workgroup manager to the left of the Users accounts and the Groups? Or do I get that info another way?
I hope that helps..!!!! Thanks, Bob

Apr 26, 2006 10:35 AM in response to bbauer

bbauer
Then I login as "root". Sorry, I know it's risky....
Yes. Read the man page for sudo.

Well let's just see exactly what is going on. Using Terminal on your new machine, copy and paste the following into the Terminal window, one line at a time, with a return after each line:

ls -al /Volumes/
nireport . /users uid gid name realname home | awk '$1>500 {print $0}'
diskutil info /

Post all the output, including the commands, here.

Now go to the original machine, and using Terminal, do the second and third commands on that. You do not need to be root to do this. Again post the output.
The copy works fine, the Owner is set as "admin" and the group is "unknown", this is on all the files and folders.
Well, this isn't fine, since the man page for ditto says:
<pre>

The resulting files, links, and
devices will have the same mode, access time, modification time, owner,
and group as the source items from which they are copied.

</pre>But we'll see what's wrong from the output you post.

Apr 26, 2006 12:19 PM in response to Michael Conniff

Maybe I missed it, but I haven't seen mention of what protocol is being used to mount the shares. From the description though, I suspect this all has to do with the convoluted "translation" that afp (server together with client) perform to give the person on the client side access to files on the server side regardless of their respective ' uid' at either end.

Without going into details, some of the variables might be the whole issue of "translation" (I don't know what the official word for this process is) of ownership, "translation" of permissions, differences in 10.4 vs 10.3 with respect to how items owned by user "unknown" (ie "uid:gid" of "99:99") are handled, and differences between how a regular user and "root" see items owned by "99:99"... for starters. This can result in apparent oddities such as, for example, a file on the server with "070" permissions appearing to be "700" to the client, depending on the respective group memberships. So if the user on the server whose credentials are used to connect to the server has permissions to an item, the client side user who used those credentials will one way or another get permissions to access the item, but the actual mode used might be different.

So I suspect that ' ditto' actually is preserving the permissions, but as it sees them from the client side.

But given all of the variables, I'm not sure if it will be possible to do this migration over afp. I don't know - ' scp' might work but I don't know how to get it to preserve ownership; firewire target disk mode might be another possibility.

Ditto command wont copy permissions

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.