Can't preserve creation, modification times on copy

Status
Not open for further replies.

physicsguy

Cadet
Joined
Jul 27, 2011
Messages
6
I created a striped ZFS. I turned off atime on my afp share. When I do a finder copy under Mac OS X, the creation and modification times are preserved. But if I do a "cp -p" in terminal, the creation and modification times are updated to the current time. I need to do a lot of copying and doing it thru the finder is slower and a big hassle. Why doesn't cp -p work the way it should when copying to a freenas share? It worked OK when copying to a readyNAS. Thanks for any help.
 

physicsguy

Cadet
Joined
Jul 27, 2011
Messages
6
I take back what I said about the readyNAS. The cp -p worked in preserving creation/modification time copying FROM readyNAS to external Firewire. I don't know if it would have worked the other way around. My readyNAS is taken apart so I can't try it now. Still looking for an answer to my problem of cp -p to freenas.
 

Scrat

Dabbler
Joined
Jul 25, 2011
Messages
12
You're right, just tested it on my MacBook (Lion 10.7). Same behavior with cp -a. Then I set "AFP3 Unix Privs -> on" in the share settings and now it works as expected. :smile:

Greets, Peter
 

physicsguy

Cadet
Joined
Jul 27, 2011
Messages
6
Thanks! That almost does the trick! It fixes the modification and last opened time. But the creation time is still now. Same with rsync -rlpt command. Finder drag and drop preserves everything. What magic could apple be doing?
 

physicsguy

Cadet
Joined
Jul 27, 2011
Messages
6
I read somewhere that ditto is the CL equivalent of Finder drag-and-drop. But had same problem. The only work-around I have so far is to create a Mac disk image (e.g., a sparseimage) on the freenas. Then mount the image and write to that with cp -p, rsync -rlpt, or ditto. That preserves all attributes. Kind of a hassle, and not cross-platform: Windows can't read HFS+ disk images. Haven't tried with MBR FAT32 image and won't bother. There has to be a better way.
 

Scrat

Dabbler
Joined
Jul 25, 2011
Messages
12
Thanks! That almost does the trick! It fixes the modification and last opened time. But the creation time is still now. Same with rsync -rlpt command. Finder drag and drop preserves everything. What magic could apple be doing?

Does it mean creation time is later than modification time? That's funny. Sorry, but I have no further ideas. :confused:
 
Status
Not open for further replies.
Top