Mac OS X 10.1: "Error Code -50" Alert Appears When Copying Files From a Remote Disk

When trying to copy files created by other users from a remote disk to the local Mac OS X startup disk, the root user may see an alert box with the message "Error code -50" .
This article has been archived and is no longer updated by Apple.

When you are logged in as the root user and you try to copy files from a remote disk to the local Mac OS X startup disk, an alert box with this message appears:
    "Sorry, the operation could not be completed because an unexpected error occurred (Error code -50)."


You may use the copy command (cp) or CpMac command in the Terminal to work around this issue, as described below.

  • When copying an item with the cp command, any item in the destination folder of the same name is overwritten immediately. You do not receive a warning as in the Finder. Be sure to rename or remove any item of the same name that you do not wish to lose.
  • Any file that has a resource fork must be copied with CpMac, not with cp. Information for using CpMac may be found in technical document 61646, "Mac OS X: About Improving SMB File Transfer Speed with cp or CpMac".
  • As a general precaution, you should only log in as the root user when there is not an alternative. For information and precautionary statements about using the root user, see technical document 106290, "Mac OS X: About the root User and How to Enable It".

To use the cp command , follow these steps:
    1. Open Terminal (/Applications/Utilities/).
    2. Type: cp -R
    Important: You must type a space after the "R", so that the result is "cp -R ". The command does not work without the space.
    3. Drag the folder or file you wish to copy from the Finder window into the Terminal window. This will automatically type the item's pathname for you, and the required space should automatically be typed after it.
    4. Drag the desired destination folder from the Finder window into the Terminal window. The pathname is automatically typed.
    5. Press Return.
    6. Quit Terminal.

Note: This article contains information about Apple Developer Tools software (CpMac). AppleCare does not provide usage support for Apple Developer Tools software. Paid support for Apple Developer Tools software is available at
Published Date: Feb 17, 2012