Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm using an old iBook G4 (PowerPC) running Tiger to serve iTunes to the house. For the past week or so, the mac boots fine, and then sometime during the day starts generating

An unexpected error occurred (error code -50).

errors when iTunes attempts to save its library file.

Checking reveals that the boot drive (main drive, in the laptop) behaves as if it is write-protected - I get the same error code when I attempt to create a folder on the desktop, for instance. If I attempt to create files via the terminal, e.g. via ls > foo.txt I get an "invalid argument" error.

I've set the iBook to run in Target Disk Mode and run Disk Utility to repair the disk (from a Macbook running Snow Leopard) and get "The volume appears to be ok".

I don't have the option in Disk Utility to Repair Permissions in Target Disk Mode. When I ran Repair Permissions on the iBook itself, it came back with no errors, no permissions corrected, but did not in fact fix the problem.

Rebooting always solve the problem - for the next 5-10 hours or so.

Would Disk Warrior help, or some other software fix, or is it time to buy a new drive? (And, in any case, what's going wrong?)

share|improve this question
1  
You've made a full backup of the files in case this is a sign of drive failure, no? –  bmike Mar 13 '12 at 13:22
    
Yes, I have done so. –  Citizentools Mar 14 '12 at 13:43
    
    
I've got a similar situation here: apple.stackexchange.com/questions/98876/…. @Citizentools, did you find the problem or a fix? –  acjay Aug 15 '13 at 4:44
add comment

2 Answers

Error 50 is a generic - iTunes has failed to write a file and the article listing specific store errors (expand the section on Specific Conditions and Alert Messages to reveal -50 in that section) deals with the usual problems where the store is failing or the network is failing.

In your case, it's very likely the drive is the cause. You can and should look in the console app to see what other errors happen around that time. Look for I/O errors - disk0 - or just run disk utility and have it verify / repair the catalog file. This will confirm the guess that the drive is failing and the errors are not some software problem.

You could export the current library xml to the desktop and start over with a brand new iTunes library file just to rule out corruption in that file, but then you would have two problems at the same time - terminal unable to write a file and iTunes unable to write a file. Occam's razor (and my experience) says it's the filesystem/drive - not two identical software problems.

Spinning hard drives do track the sectors where a bad write has happened and try to keep track of them so the system won't notice files not vein written, but as a drive ages (or if this mechanism fails) you will get unrecoverable errors more and more.

Also - it's often hard to tell if the catalog structure is bad (which Disk Warrior, Drive Genius and plain old erase in Disk Utility attempt to fix assuming the drive works properly). But if the underlying hardware is failing, you'll need to move to a new drive.

I would just make another backup and zero the drive and look for errors during the zero / reinstall. If the errors persist, it's time for a new drive once the pain of reboots is more than the cost of a new part costs.

In your specific case of an old PPC machine where repair is invasive and the cables likely to be brittle, I would just re-install the OS onto an inexpensive and many GB external drive and run the mac from a cheap USB drive (most iBooks will boot from USB, but not all will) - leaving the potentially failing internal drive sitting unused, unmounted and spun down. It's rare for a failed drive to take down the machine so you can just leave it alone for minimal cost if you can tolerate the iBook running on an external drive.

share|improve this answer
1  
Agree on the Occam Razor inference - other programs that need to write files to the boot disk complain as well. Also wondering why rebooting cures it, temporarily? –  Citizentools Mar 13 '12 at 19:14
    
It would be interesting to graph how long after a reboot the system was clean. Do you shut down or just an on-the-fly restart? –  bmike Mar 13 '12 at 19:19
    
On the fly restart. –  Citizentools Mar 13 '12 at 20:02
    
Someone reporting what seems like a similar problem, on an external drive [forums.plexapp.com/index.php/topic/… –  Citizentools Mar 13 '12 at 22:08
    
Hmm the apple doc is for "Mac OS 9 and earlier" so I don't think it is relevant –  Mark Apr 20 '13 at 8:40
show 1 more comment

Error -50 in relation to Mac OS X or OS X

The error:

  • relates to the file system
  • may occur with a good file system on a good drive.

Sharing

… Tiger to serve iTunes …

That's open to interpretation.

Considering the range of situations – not limited to iTunes – in which issues occur, I imagine that:

  • with Tiger on the iBook G4, you use the Sharing pane of System Preferences to share a folder
  • with Snow Leopard on the MacBook, you prefer iTunes to write its library to part of that shared folder.

If so, then you should take care with:

  • the numeric IDs of all users of iTunes
  • at the iBook, the ID of the user where you find issues with the home directory
  • at the iBook, the permissions of all folders and subfolders that you wish to be writeable by remote users of iTunes.

Hint: the ability of Disk Utility to verify permissions does not extend to situations such as this.

iTunes aside, the question makes me wonder whether ownership is as it should be on the iBook. An issue might arise if, say, a home directory was copied from one Mac to another without attention to numeric IDs of users.

Suggestions

At the iBook, with Terminal, command:

ls -n ~

ls -dn ~

ls -dn ~/Desktop

For each of the three outputs: in the third column, note the numeric ID of the owner.

Then:

dscl . -list /Users UniqueID

Does the numeric ID match?

And so on … consider the numeric ID of each remote user of iTunes.

Reference

dscl(1) OS X Manual Page

  • in this case, the version of the page for Mac OS X version 10.4-intel may be equally good for Tiger on PowerPC.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.