November 6, 2007 11:21 AM PST

Leopard bug identified with moving data

by Tom Krazit
  • Font size
  • Print
  • 48 comments

If you're moving data from one Mac or PC to a Mac running Mac OS X Leopard, don't trip over the cord.

Tom Karpik, a computer science student at the British Columbia Institute of Technology, says he has identified a bug in Leopard that can cause you to lose data if problems occur while moving files between two different storage volumes, such as two different hard drives. Apparently, the problem is that if the source of the file crashes or is disconnected from the network while the move is under way, the contents of the file completely disappear from the source machine, and you're only left with whatever had already been copied to the destination machine.

Be careful when moving files from a Mac or PC to a Leopard machine.

(Credit: Apple)

We're talking about moving files here, not copying them, which is a bit more dangerous way of getting a file from one place to another. When you opt to move a file, you're acknowledging that you want that file deleted from the source machine after the operation is completed. And you have to actually hold down the Command button when dragging the file from one volume to another to bypass the default way of doing this operation, which is to "copy" the file from source to destination when the icon is dragged across the screen.

Commenters on Karpik's blog, Slashdot, and others like Daring Fireball's John Gruber point out that you're asking for trouble if you opt to "move" files rather than copy them. An easy way to avoid any problems is to just drag the file from one volume to another without pressing any keys, and if you really want the file gone from the source machine, manually delete it after everything has been completed.

But Karpik's point is that Leopard shouldn't delete the source data until it has verified that the transfer was successfully completed. "Windows behaves differently in that it never deletes the source unless everything has been completely copied to the destination. This is just sane, to-be-expected behaviour," he wrote in an e-mail in response to asking for clarification on a couple of his findings. Some commenters on Karpik's blog said this is an issue that has existed since Panther (Mac OS X 10.3), but I haven't been able to confirm that.

I sent an e-mail to Apple earlier this morning asking if it had identified this as a bug or problem, and if any fix was anticipated. I'll update if I hear back.

Tom Krazit writes about the ever-expanding world of Internet search, including Google, Yahoo, online advertising, and portals, as well as the evolution of mobile computing. He has written about traditional PC companies, chip manufacturers, and mobile computers, spending the last three years covering Apple. E-mail Tom.
Recent posts from Apple
iTunes U breaks 100 million downloads
Study: iPhone beats Windows Mobile in market share
Apple update supports new Canon, Nikon raw files
Apple wins permanent injunction against Psystar
High volume of Mac sales may account for iMac delay
Apple apologizes for iMac delays
iPhone users are delusional, consultants say
The iPhone moves from the quad to the classroom
Add a Comment (Log in or register) (48 Comments)
  • prev
  • 1
  • next
Lost in the Move
by Keith A Caldwell November 6, 2007 12:06 PM PST
This may seem like a minor deal but really I really don't think that it is. I am glad that you put this up because I would have assumed, like most people I am sure, that the source file would not be deleted until the move was completed successfully. Ouch!

I am thinking about buying a new Mac and will continue to wait a little longer to see what else turns up...
Reply to this comment
Not so fast
by J.G. November 6, 2007 12:25 PM PST
A user must go through several erroneous actions to trigger the
exploit. You are exaggerating the seriousness.
Reply to this comment
What "erroneous actions"?
by ncalishome November 6, 2007 12:32 PM PST
Moving files from one place to another and suffering a network/hardware failure... Where's the erroneous action?

Personal story, our NFS box was running very very slow yesterday morning and when I asked my business partner he said he was moving 30 gigs of photos off of it because he wanted to do a clean reinstall of Leopard. Had a rebooted it without asking him (which I almost did) he would have been screwed. His fault how?
View all 2 replies
That's impossible
by caywen123 November 6, 2007 12:36 PM PST
That's impossible because it's never happened to me. Also, OSX is perfectly secure because no one ever hacked me. And my logic is perfect because I don't read rebuttals.
Reply to this comment
Not entirely unpossible... ;)
by Penguinisto November 6, 2007 4:45 PM PST
[i]"Also, OSX is perfectly secure because no one ever hacked me."[/i]

Well, no one ever managed to hack this guy, either:
http://www.informationweek.com/news/showArticle.jhtml?articleID=181502078

I can readily admit that the move thing is a pretty dumb move. I can also sit and watch as it is (very) easily patched.

Now about those 10^300 exploits and bugs in Windows that require everything just shy of overhauling the entire OS to fix... ;)

/P
View all 3 replies
What a low quality bugfest -nt
by john55440 November 6, 2007 12:53 PM PST
no text
Reply to this comment
BS on the 'a bit more dangerous'
by catch23 November 6, 2007 1:41 PM PST
What are you talking about? A 'move' is a copy/verify/delete, which is exactly like you copying then deleting.
It almost seems like your removing some of the blame from Apple. 'What you did was risky'.

No, what Apple did was not verify, simply delete.
This is staggering incompetence that never should have gotten by QA.
Reply to this comment
Missing the point
by J.G. November 6, 2007 2:45 PM PST
There is a fine procedure that is the default. You would have to
be careless to prefer moving to copying.
View reply
I've experienced this bug
by hinyan November 6, 2007 4:13 PM PST
I have had many experiences of this bug - and had to recover files
from backup disks when I noticed they weren't copied properly. I'd
discovered this behaviour when I moved from Windows to Mac. The
work round is "copy", "compare results" then "delete". This minor
inconvenience, however, still justifies the much more elegant and
productive OS X user interface.
Reply to this comment
Is it just me
by jmmejzz November 6, 2007 5:12 PM PST
Is it just me but why would someone do a "move" rather then a "copy" and then verify then delete?
I have always assumed a hardware failure or a disconnect during a move could result in data loss. ****, I get that alert whenever I prematurely disconnect my iPod.
Reply to this comment
Copy, not move is sound advice
by Vegaman_Dan November 6, 2007 5:24 PM PST
It doesn't matter what OS you're using. To be secure in your file transfers, copying and verifying the transfer was successful before deleting the source files is advisable over a blind move.

Any number of things can happen during a move process from network interruptions, HDD failure, HDD Controller issues, NIC's failing/flaking, power disruptions, or even the cat stepping on your keyboard at a bad time.

I'm somewhat surprised that Leopard would do a move without confirmation before deletion but I'm sure Apple will implement a fix for this soon enough. Sounds like a simple oversight that can be quickly remedied.
Reply to this comment
If this was Vista, there'd be 1000 negatives
by Anon-Y-mous November 6, 2007 5:45 PM PST
I can't believe what I'm reading from the Fanbois! "Not a problem", "Just choose copy instead" "You have to disconnect the cable to cause it". If this was MS, then you'd all be calling for blood.

At least Microsoft has had this working right since Windows 3.11.... A move algorythm designed properly will always COPY the file first and on acknowledgement of successful transfer back on the source, THEN and ONLY THEN delete the source file. Like, DUH!

So was this one of the 'benefits' they got by starting with a Unix core, or just one of those superb Apple designs we hear so much about?
Reply to this comment
Blame on both parties.
by ralfthedog November 7, 2007 10:41 AM PST
Yes, OS-X behavior described is incorrect, however anyone doing a move not a copy of critical data is a moron.

Apple will fix this bug quite fast. Even after the bug is fixed, please remember, copy not move no matter what OS you run.
Editor should make the note
by timber2005 November 6, 2007 6:06 PM PST
I'm not saying how to do your job... trust me I wouldn;t.

I think readers might agree to this more if you note that this becomes more and more of a problem with larger files. Moving a 5KB document isn't probably going to have anything break the transfer. But if you're copying your latest iMovie creation that sizes 300MB, and over a wired network might a minute to five, and thats when a power failure or something might happen.
Reply to this comment
Rule of thumb: NEVER move files on any OS..!!
by imacpwr November 6, 2007 10:41 PM PST
Moving files from one volume to another* without copy/pasting
them is suicidal in any OS. The safest way is to copy/paste, confirm
the new copy is in order then go back and delete the original.

*example: a different hard drive, internal or external
Reply to this comment
Mov ing files
by dminott November 7, 2007 6:20 PM PST
I've been moving files since the days of CP/M,
all the way through Vista, and I have NEVER lost a file that way. Just try moving al the data from one drive to another (as in cloning.)
I hope you're not suggesting that I copy all 30,000 files then go back and delete 30,000 files???
Face the fact, Apple has goofed.
View reply
not really
by darthstupid November 6, 2007 11:39 PM PST
i don't think too many people would blink if vista did this. most wouldn't be surprised by vista having yet another bug...
Reply to this comment
Important to publicize
by sanenazok November 7, 2007 6:10 AM PST
It's important to publicize these sorts of things, because just about everyone expects modern OS's to do these sorts of things impeccably. I mean, we're talking about one of the most basic file I/O operations here that better work correctly.

I for one would not move ALL my files to a new OS, but eventually I can see this impacting me. For example, I often MOVE older files from my laptop to desktop to clean up the laptop. Sure I could copy and delete, but that's a hassle beyond compare, especially if the older files are in many different folders. What if something interferes with the laptop's wireless connection or it goes into sleep mode cutting the connection in medias res? It's not that unlikely that this will happen.

I hope Apple fixes this...of course personally I don't have to worry since I'm using Windows on one and Linux on the other (but could care LESS what OS is better so don't tell me what you use or why).
Reply to this comment
And the better OS is...
by Seaspray0 November 7, 2007 6:35 AM PST
That's for you to decide for yourself what's best for you.
View all 2 replies
Designed by humans in an imperfect world
by Seaspray0 November 7, 2007 6:18 AM PST
In a perfect world, the "move" works great. It does what it's supposed to do. But, alas, this is not and the code was designed by humans. No doubt this will be patched. It could have been much worse... i.e. Windows Millenium would crash the operating system if you defragged the hard drive issue (it got patched too). It could have been better (move files using the same method windows does: copy, verify, then delete).

Code is designed by humans in an imperfect world and we just got reminded of that with this story. This will not be the last time this happens. Despite what the fanboys tell you, there is no such thing as a perfect operating system.
Reply to this comment
May be "Risky" but the majority does it!
by GreySkies01 November 8, 2007 8:34 AM PST
Since I am a MCSE, I tend to think of how long this has been a no brainer in the Windoze world, but...

I have just read through everyone saying "You should copy, verify, delete; not move!"

They of course are right.

I have also just read "It should be a no brainer basic OS function!".

They are also right.

While most people that work in the IT industry ALWAYS copy/verify/delete, their spouses, loved ones, friends, and children have a tendancy to do the easiest thing possible. MOVE. One Command, not thinking..

It's a bug.. Just like all bugs that make the news, it will be fixed. My personal opinion is that it should not have slipped through, since it is so low level. But, there have been TONS of bugs in EVERY OS that should not have slipped through.

We know about it now, so until it is patched, inform your kids not to move a movie from HD to HD until it is fixed. Or simply tell them to copy and deleted, or... Wait till you get home and you will do it until the bug is fixed.

Simple bug, simple fix (most likely), potential to cause moderate damage, esecially in the Kid, Wife, friends how just want it to work department.

Not a big deal to IT pros, just annoying that it shouldn't be there.

J.G.
Reply to this comment
This is a good point
by rapier1 November 8, 2007 9:00 AM PST
In any industry there are best practices that tend to be widely
known and, unfortunately, widely ignored. The reason they are
ignored often tends to be that they add additional steps without
an *immediately* perceived benefit. In an ideal world this can be
addressed with simple user education. Unfortunately, user
education is often a drawn out battle with, at best, variable
results. As such, it seems to me that fix of the underlying
problem is a more effective use of resources than engage in a
constant battle with uninformed users (the supply of which
seems infinite).
I've done if for years...
by b8375629 November 11, 2007 8:52 AM PST
Basically, it's called "cut-and-paste" in Windows. Never had a problem doing it. Never lost data or anything.

However, for peace of mind, "copy-and-paste" if you must...
Reply to this comment
(48 Comments)
  • prev
  • 1
  • next
advertisement

Google's top antitrust defender: 'It's fun'

Life at Google is certainly different than government service for senior competition counsel Dana Wagner, but his past and present collide on a daily basis at the search giant.

CE industry hopes 'Avatar' is a hit

Good box office returns for the 3D film are expected to spur 3D entertainment from the theater to the living room.

About Apple

At the start of the 21st century, there's no tech outfit more influential than Apple. CNET News' Erica Ogg and other reporters will attempt to make sense of the rumors, hype, products, and people that will shape the future of the company. But Apple's not the only game in town, as the established cell phone companies and others strike back against the iPhone. E-mail Erica at erica.ogg@cnet.com.

Add this feed to your online news reader

Apple topics

advertisement
advertisement

Inside CNET News

Scroll Left Scroll Right