How to regain access to user files and folders after copying or migrating

There are times when you may copy files or folders to your system and cannot access them because the system does not allow you permission to them. In the case of folders, you may see a small "no entry" symbol to the lower right of the folder icon. This may happen after migrating or copying files, but it can also happen when accessing shared resources such as network drives, thumb drives, or external hard drives.

There are times when you may copy files or folders to your system and cannot access them because the system does not allow you permission to them. In the case of folders, you may see a small "no entry" symbol to the lower right of the folder icon. This may happen after migrating or copying files, but it can also happen when accessing shared resources such as network drives, thumb drives, or external hard drives.

Access Denied Folder
The access-denied symbol will be appended to folders for which you cannot access. Files do not have a similar indicator for their icons.

The reason these files are not accessible is a simple mixup in the permissions flags for them. Usually when you copy files, the system will append your name as the owner of the copy, and give it the standard permissions that allow you to read and write the files; however, some copying routines may either preserve old permissions or not properly assign new permissions and result in inaccessible files.

Files in the system are flagged both with UID (user ID) and UUID (universally unique ID) numbers for identifying users and groups and their respective permissions that are associated with the files. If a UID does not exist on the system then you may see "_unknown" or "nobody" as the owner, or sometimes the system may append one of the obscure system-related user accounts such as "_www" or even "system" to the file. The same goes for groups, which also have their own unique identification numbers.

These directory mismatches during copying or migration are not a problem as long as they only happened once, and also only if the files are not system files.

To regain control and read/write access to these files, you will need to reset the permissions on them, which can be done with the following procedure:

Finder Inspector
The Finder's Inspector can be used for getting information on multiple items, including changing permissions.
  1. Select the file and press Command-I to get information.

  2. Click the lock at the bottom of the window and authenticate.

  3. Click the plus sign and add your username to the permissions list.

  4. With your username selected, choose "Make 'username' the owner" from the gear menu at the bottom of the window.

  5. Optionally remove any other users and groups besides "everyone" (you cannot remove this group).

  6. Set your username to have "Read and Write" permissions, and set "Everyone" to "No Access".

  7. If the item is a folder containing other items, you will need to propagate these permissions to the enclosed items, so choose the "Apply to enclosed items..." option in the same gear menu (this may take some time for large folders with many items).

When this procedure is done, you should now be able to access the items. Though this procedure is good for one or two items, or for items that are enclosed in a single folder, it may be cumbersome if you have multiple items with this problem. To change permissions on more than one item, in the first step hold the Command key down while selecting the desired items, and then press Option-Command-I to bring up the inspector instead of the normal info window. From here you can change the permissions accordingly.

Keep in mind that using the inspector will only work if you have selected only folders, or only files. If you select a combination of files and folders then you will not be able to change permissions on them using the inspector.

Note: This procedure should only be done for files you have explicitly copied to your home folder or that reside on a shared storage drive. Do not do this for any files in another user's account, or for any system files since this may break the functionality associated with those files.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Tags:
Computers
About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    ARTICLE DISCUSSION

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    Hot on CNET

    CNET's giving away a 3D printer

    Enter for a chance to win* the MakerBot Replicator 3D Printer and all the supplies you need to get started.