X

Items not accessible on local secondary hard drive

<p>Sometimes, people have switched computers and tried to make use of their old hard drives by installing them in the new computer. This can be done easily in a Mac Pro, but also can be done for other models by putting the old drive in an external enclosu

CNET staff
3 min read

Sometimes, people have switched computers and tried to make use of their old hard drives by installing them in the new computer. This can be done easily in a Mac Pro, but also can be done for other models by putting the old drive in an external enclosure. Sometimes, however, the computer may not let you access the files on the drive.

Apple discussion poster "LouIsFatAndSassy" writes:

"I successfully installed my G5 harddrive into my intel Mac Pro computer. The Mac Pro has 10.5.7 for intel already set up, and the G5 was the main bootable drive on my G5 before it fried. I can see the old harddrive as a disc, but I'm having trouble getting very important information from it. Where is everything that was on my desktop on that old machine? Where is everything that was user/login sensitive?"

In addition to the files not being where they were expected, once found, they deny the user access to them folders presented with a red "do not enter" symbol.

When this happens, it means the system has determined the account you're logged-in as does not have read or write access to the folders you are trying to access. This is because each folder is tagged with owner and group information based on the old system's user directory, and if there are mismatches in user and group IDs with the new system (which is easily the case), then the system will claim the folders belong to an unknown user and will not grant access.

There are a couple of ways to propagate ownership and permissions through a drive to regain access to files on it (this only works with local files, and not for networked volumes).

WARNING: A quick word of precaution, do this only on secondary drives, and do not attempt this on your boot drive since doing so may break your system installation or the security of your files.

  1. Get info on the folder for which you do not have access (it can be the actual hard drive--NOT the boot drive).
  2. At the bottom, ensure your username is added to the list. Click the " " symbol to add a user.
  3. Give your username both "Read and Write" permissions.
  4. From the small gear menu, choose "Apply to enclosed items," and confirm doing this.

This may take a while, but will ensure your current user account has full read and write access to files on the disk.

While this will work to give you access to the files, it will not make them fully belong to your current account, since it just adds another tag to the files with information about your current account. Therefore, another approach is to change the ownership of the files on the disk to your account name. To change ownership for all the files on a disk, open the terminal application and type the following command, followed by a single space (copy and paste this command, since the apostrophes are actually accute accent characters--under the tilde).

sudo chown -R `id -un`

With this command typed, drag the secondary hard drive to the terminal window to complete the path to the drive, so the command looks something like the following (specific folders can also be used as well, instead of the whole drive):

sudo chown -R `id-un` /Volumes/HARD_DRIVE

Then press enter and authenticate when prompted for your password. After this, the drive or folder and all enclosed items will be owned by your username. Now, you can run a similar command to ensure the new owner is given full read and write access to the folder or drive:

sudo chmod -R u rw /Volumes/HARD_DRIVE

(In this command use a similar procedure to fill out the drive path, by entering the first part of the command followed by a space, and then dragging the drive or folder to the terminal window.)

After these commands have been entered, the files on your external or secondary drive should be fully accessible by your current user account.

UPDATE: Command correction

Resources

  • More from Late-Breakers