The hard drive on most Mac systems is one of the user-serviceable components of the system, so you can follow instructions such as these provided by Apple to access and replace the drive to upgrade it, or swap a broken one out for a working one. The replacement of the hardware can be relatively straightforward, but sometimes you might run into hurdles when accessing files in user accounts and other locations on the older drive.
While Apple offers options to migrate user files, accounts, and settings to the new drive either from the old drive directly or from a backup, people upgrading their hard drives might take the opportunity to start fresh and create a new account and system setup to avoid any system clutter and quirks that may have accumulated over time on their old drive. However, users might still wish to access their old drive in order to read a configuration file or two, or manually copy files they might need to the new system.
While Time Machine and other backup solutions offer convenient ways to locate and restore files (and is recommended to use as a backup option before upgrading any drive) sometimes people might not have resources to do this or might not wish to use automatic restoration options for getting their files to the new system. Instead, by simply attaching the drive to the Mac using a USB or FireWire drive enclosure or adaptor, they can mount the old drive on the system and copy files from it; however, upon doing so might find their files inaccessible.
Instead of being able to browse all files on the drive, the drive will contain folders with a red prohibitory symbol, and opening or copying these files will give you a permissions-denied error. This behavior on the old drive indicates that the system recognizes permissions restrictions on the drive and is enforcing them.
OS X governs how user accounts access files and folders through user and group permissions settings, and unlike many shared resources such as those in the global library and system folders, user account files are restricted for all except the owner of that account. This pairing of a user account and its files is done by special User ID codes associated with the account, so even if the current username is the same as the old one, if these codes are different, the system will deny access to the files.
Options for accessing the old files therefore include changing your current account's User ID, though this is not recommended as it will likely destabilize your account on the system. Another approach is to change the permissions for the files and folders on the external drive that you need to access, which can be done by getting information on the desired files and folders and changing the user and group read/write status. However, this option can be cumbersome to do, especially if you need to browse or copy files from many folders.
A third option that is best for managing files on local secondary drives (USB and FireWire drives, or secondary internal drives) is to have the system ignore the permissions setup on them completely. This option in OS X is convenient because often people use external drives on multiple systems, and as a result, files that have many different permissions settings may be written to the drive and result in odd access errors when used on different machines.
By setting the system to ignore permissions, you bypass the clutter of odd permissions settings that may be kept with the files on the drive, so the system views the files as generic ownerless ones that anyone can access. When copied from the external drive to the new internal drive, the files will then inherit the current user's ownership and access permissions.
To ignore permissions on the external drive, simply get information on it and you should see a small check box in the Sharing & Permissions section for enabling this feature. Once the box is checked, then you should be able to browse the drive's contents and copy any file or folder from any location on the drive.