Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Really it's the same computer - I just did a fresh install of Snow Leopard. When I try to open the Documents directory from my old user account I get

The folder "Documents" can't be opened because you don't have permissions to see its contents.

I think the problem is that my user account ID changed when I installed Snow Leopard. It was 503; now it's 501:

ls -al /Volumes/ExternalDriveName/Backups.backupdb/ComputerName/2009-09-03-120049/ComputerName/Users/
drwxr-xr-x@ 43 503    staff  1462 Jul 20 15:14 gaius

echo `id -g` `id -u`
501:20

I tried both chown -R and chmod -R, but both give me

Operation not permitted

I also tried changing the permissions via Inspector. They're all greyed-out, even when I authenticate as an administrator.

Any help?

share|improve this question

9 Answers 9

up vote 5 down vote accepted

You could also invoke "Enter Time Machine" as root. That requires Finder to be started as root first, so only for those who understand the risks. In Terminal, for both Leopard and Snow Leopard:

sudo /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder

In Snow Leopard this does not (always?) open an initial Finder window. Do not click the Finder icon in the Dock (which might take you to your normal Finder), but use Command-Tab to go to Finder (which will be the new root-Finder). Here, hit Cmd-N for a new Finder window.

The new Finder looks like a normal Finder, but you'll notice root next to the home folder icon in Finder's sidebar. While the root-Finder is active, enter Time Machine (and once again validate that root is shown next to the home folder icon). This should allow you to browse, delete or restore what you need (but, for the original question: it won't solve your access issues permanently).

(As usual, holding down Option while clicking the Time Machine icon will change "Enter Time Machine" into "Browse Other Time Machine Disks" if you need to examine a disk that is not associated to your current machine. You might not need to be running as root to do that though!)

When done, eject the Time Machine volume if applicable. Next, hit Ctrl-C in Terminal to stop the root-Finder. The usual Finder will still be running, but in Snow Leopard the indicator in the Dock may have gone. Run killal Finder if that bothers you. (And if you forgot to eject the Time Machine volume while you were still root and the disk doesn't unmount properly at a later time, or if Time Machine won't mount it correctly when running its hourly backup, then you may simply log off as an easy fix.)

(If anyone knows how to do this without first running a root-Finder then please tell us! Running sudo "/Applications/Time Machine.app/Contents/MacOS/Time Machine" does not give the expected result, and I assume that the Time Machine galaxy window is in fact part of Finder. For the sake of search engines: "run time machine as root", "start time machine as root".)

share|improve this answer
    
I tested this in Snow Leopard, and it did not work. Do you need to quit Finder first? If so, how? –  David Pearce Sep 6 '09 at 2:13
    
@joshhunt, I now tested in Snow Leopard as well and indeed, things are more confusing so I enhanced my answer. In fact, quitting the normal Finder makes things slightly less confusing, but then you'd need to add the Quit Finder menu option first, using defaults write com.apple.finder QuitMenuItem 1; killall Finder -- which I find quite useful to get rid of Desktop icons during presentations. Finder will always restart if no other program is running. When quitting Finder without starting a root-Finder one cannot use Enter Time Machine, so the galaxy is indeed part of Finder. –  Arjan Sep 6 '09 at 11:47

I just clicked on the restricted folder (in my case Desktop), clicked Restore and away it went. I had to choose the new location (or I could choose to recreate the original) and I just chose my desktop. Simple.

share|improve this answer

Okay so I'm not computer savvy by any means, but i have been puzzling over this for almost two hours now and i think i may have figured out something relatively easy that seems to be working.

When I would go into finder and select my external hard drive (which i called 'my life in virtual form) from the side bar, there would be several folders which would have this bizarre red minus sign in a circle at the bottom right corner. whenever i tried to open it, it liked to tell me finder couldn't open it because I didn't have 'permission...' whatever that means because I totally give myself permission to access my own writing.

Anyway, I took this file (the 'documents' folder from a backup of my old mac) and dragged it to the desktop. It copied it, still with that annoy little minus sign in the corner, but bear with me because this is where I stupidly stumbled onto my own genius. from the copied folder on my desktop, I then dragged it back over to the sidebar and dropped it into the 'documents' tap there. again, i had to wait for it to copy, and when it was finish, tada! magically I could go inside of it and open files from my old mac i apparently didn't have permission to see.

I have no idea why or how this worked for me, like i said, I tend to suck the life out of my technology faster than i do most anything else in life, but i now have access to these files after hours of scratching my head and being denied apparently by my own self. Hope this helps you guys and good luck!

share|improve this answer

It appears that Apple sets an ACL that denies everyone (root included) from deleting or modifying ownership etc on the Backups.backupdb folder and its contents, so using sudo or other root access does not help to change permissions.

drwxr-xr-x@   4 501   staff    136 18 Jun  2008 backedupfolder
com.apple.metadata:_kTimeMachineNewestSnapshot     50 
com.apple.metadata:_kTimeMachineOldestSnapshot     50      0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown

everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown

You can gain access to folders that are inaccessible by the current user by setting Ignore Ownership on the Time Machine volume. Unfortunately Apple have removed this from the Get Info window for volumes that are Time Machine volumes (or have been used as such in the past).

You will need to instead set the Ignore Ownership for a volume from the terminal instead.

vsdbutil -d '/Volumes/TimeMachineVolume'

You can reverse this using

vsdbutil -a '/Volumes/TimeMachineVolume'

As soon as TimeMachine runs again it will also re-enable ownership on the volume.

share|improve this answer
1  
The vsdbutil trick worked great -- let me restore stuff from Time Machine that TM said I didn't have permission to restore. –  dossy Jan 11 '12 at 4:46
    
This worked for me in Lion, unlike the "sudo Finder" trick from Snow Leopard, which crashed Time Machine. –  Michael Cramer Mar 31 '12 at 15:02
    
Same experience as @MichaelCramer –  Sammy Larbi Oct 5 '12 at 19:00
    
Simple, effective and reversible. Kudos! –  phatmann Mar 27 '13 at 12:12
    
worked for me in Lion. Thanks soooo much!!!! –  Eric O. Korman Mar 29 at 18:36

Use Arjan's method, and right click the inaccessible folder, choose "Get Info", in "Sharing and Permissions" section, click the "+" to add your current account (or "Administrators") to the access list, "Privilege" as "read and write". Done. Good luck. Thank you Arjan.

share|improve this answer

Never try to change the permissions of or modify any file on a Time Machine backup. Use sudo to copy the entire Documents folder to your local drive, then chown -R.

share|improve this answer
    
I couldn't even get sudo cp -r to work. –  James A. Rosen Sep 3 '09 at 23:41

One successful method:

  1. I used Migration Assistant to migrate the account from the Time Machine backup onto the new Snow Leopard installation. If Snow Leopard sees that you're trying to migrate in an account whose name already exists, it will prompt you to create a new name. I did this.
  2. I logged in as the migrated account.
  3. I dropped everything I needed into my real account's Drop Box.
share|improve this answer

I had a similar problem where I copied the Time Machine backup files back to my hard drive after a clean install of Snow Leopard. iTunes couldn't read the music directory and I had to type my password to trash the files. My fix was to remove the extended attributes for all the files. I don't have the script I used on me, but a Google search came up with this:

http://zzamboni.org/brt/2008/05/07/removing-all-extended-attributes-from-a-directory-tree/

share|improve this answer

on the command line you should be able to type

sudo su

and be authenticated as root. If the root user is unable to access the files, then you're most likely running into a data corruption problem.


Fixing Disk Corruption:

  • DiskWarrior - great for repairing HFS+ (mac formatted) drives, but not free
  • OnyX - Has some nice drive repair, free.
share|improve this answer
    
Good thought, but it gives me the same error as sudo chown and sudo chmod. –  James A. Rosen Sep 3 '09 at 19:35

protected by studiohack Oct 4 '11 at 1:35

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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