sidewinder Posted December 11, 2009 Posted December 11, 2009 Ive got a window of 2 days after we break up to move everyones mac user areas from one server to another. Should be easy, but every time I have tried, permissions are not preserved (they are from AD, but both servers are bound to it) Tried both the simple 'drag and drop' GUI way and also through terminal, but the result is the same. What do I need to do? I suppose one way would be to enable SMB on both shares and copy using a Windows machine, but that doesnt really seem like an ideal method
pete Posted December 11, 2009 Posted December 11, 2009 (edited) I assume using cp -R --preserve /source /destination doesn't give you what you need? Edited December 11, 2009 by pete
AIT Posted December 11, 2009 Posted December 11, 2009 if you use the windows machine i would use the command xcopy that copys permissions aswell..
sidewinder Posted December 11, 2009 Author Posted December 11, 2009 I assume using cp -R --preserve /source /destination doesn't give you what you need? Ah, I didnt know about the 'preserve' bit no doubt that will work then
sidewinder Posted December 14, 2009 Author Posted December 14, 2009 Nope that doesnt work. Well, with -P it doesnt work anyway. --preserve isnt recognised at all
DMcCoy Posted December 14, 2009 Posted December 14, 2009 -p it's lowercase. I hope it's not 10.4 or earlier because cp doesn't copy ACLs with those
pete Posted December 14, 2009 Posted December 14, 2009 Nope that doesnt work. Well, with -P it doesnt work anyway. --preserve isnt recognised at all Ah, the option is present, just different flag under OS X (my example was for GNU cp). Use a lowercase "-p", see here: Mac OS X Manual Page For cp(1) try cp -R -p /source /destination Your example ("-P") tells it to ignore symbolic links, lower case ("-p") preserves attributes. *nix - like a big friendly shire horse that'll happily trample over your feet if you tell it to. edit: DMcCoy beat me to it
sidewinder Posted December 14, 2009 Author Posted December 14, 2009 Even with lowercase -p it still refuses to copy any permissions this is really odd This is the exact command I used: cp -R -p /volumes/homes/itteam/user /volumes/Data/homes/itteam homes being the mounted share of the old server. Did this as root Oh and its 10.5.8 I'm doing this on
DMcCoy Posted December 14, 2009 Posted December 14, 2009 Are ACLs enabled on the destination volume? Both must also be connected to whatever the ACLs came from (OD/AD)
sidewinder Posted December 14, 2009 Author Posted December 14, 2009 Probably a stupid question but how do I check that? There are shares on this server using ACLs Both are connected to AD, thats where all the permissions are from. One is an OD master, the other is a replica
nicklec Posted December 14, 2009 Posted December 14, 2009 I had a similar issue and ended up using rsync which seemed todo the trick - if your going between machines you can 'pull' the files remotely via ssh.
DMcCoy Posted December 14, 2009 Posted December 14, 2009 fsaclctl -p /Volumes/volumename This will tell you if ACLs are enabled on the volume or not.
sidewinder Posted December 14, 2009 Author Posted December 14, 2009 On both servers, running that says ACL's are supported on both
DMcCoy Posted December 14, 2009 Posted December 14, 2009 On both servers, running that says ACL's are supported on both I don't know if it works over the network, at minimum make sure you are connected to the remote server with AFP.
sidewinder Posted December 14, 2009 Author Posted December 14, 2009 I ran it on the local terminal on each server. Indeed running it on a remote volume brung up an error that support is unknown
DMcCoy Posted December 14, 2009 Posted December 14, 2009 (edited) I've only used it between local volumes here, NFS may work though. Edit: Assume it's ls -ale that is showing no ACLs? Edited December 14, 2009 by DMcCoy
sidewinder Posted December 15, 2009 Author Posted December 15, 2009 Ok I've mounted the 'old' homes share on the new server with NFS and it comes back with 'access control lists are not supported or currently disabled on homes' Running it on the server its being shared from, on the local hard disk, it says they are supported ls- ale just shows me the owner (admin) and staff. I'd been checking the ACL through server admin>file sharing
DMcCoy Posted December 15, 2009 Posted December 15, 2009 I think you are going to have to look at something like tar or asr Filesystem metadata support - Mac OS X Server FAQ Either that or copy the files and resource forks and then reset the permissions on the folders after the move.
sidewinder Posted December 15, 2009 Author Posted December 15, 2009 asr doesnt sound like a bad idea actually. Theoretically could I use something like CCC to create an image of that drive and then restore it to the new one?
DMcCoy Posted December 15, 2009 Posted December 15, 2009 asr doesnt sound like a bad idea actually. Theoretically could I use something like CCC to create an image of that drive and then restore it to the new one? Even disk utility will do for a full image
sidewinder Posted December 15, 2009 Author Posted December 15, 2009 Just done a incremental image as a test and it does indeed restore fine with all permissions. Looks like the best way! Thanks for all your help. Shame there isnt a more simple way of doing it!
TomH Posted January 22, 2010 Posted January 22, 2010 A simple straight copy could be done with : sudo ditto -V /Volumes/Source /Volumes/Destination Nice thing about ditto is that it preserves resource forks, meta-data, extended attributes and ACL's unless you tell it not to, good practice to run it as sudo also.
sidewinder Posted January 26, 2010 Author Posted January 26, 2010 cheers. Ive still got the teachers left to move at half term since I ran out of time, so I'll give that a go then. Disk images worked well for the students though
glennda Posted January 26, 2010 Posted January 26, 2010 cheers. Ive still got the teachers left to move at half term since I ran out of time, so I'll give that a go then. Disk images worked well for the students though have you looked at the http://www.edugeek.net/forums/general-edugeek-news-announcements/48085-edumove-here.html Toby
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now