You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Repairing permissions when owner is "Fetching..."

Problem: After upgrading to Yosemite I can’t unlock locked files (which were locked before Yosemite upgrade). In Get Info window in Finder the ”Locked” tick mark is grayed out. Sharing & Permissons are as follows:

Fetching… Read & Write

_appleevents Read only

everyone Read only

When I try to change the permissions (i.e. add myself), I get error message:

The operation can’t be completed because you don’t have the necessary permission.

I am the owner of the file and I am also administrator. I enabled root and logged in as root and still I couldn’t unlock the file or change the permissions.


I can duplicate the file and unlock the copy. Sharing & Permissons of the copy are as follows:

Hannu (Me) Read & Write

_appleevents Read only

everyone Read only

So, now the owener is correct and I can do with the file what ever I want.


However, I can’t trash the original locked file, I get error message:

”The operation can’t be completed because the item “<file name>” is locked."

If I duplicate the original locked file and delete the copy without unlocking it, I get error message:

”Item “<file name> copy” is locked. Do you want to move it to the Trash anyway?"

I can trash to copy which is locked but not the original which is unlocked as well.


The problem appeared after I moved to Yosemite (10.10.1). I did it in the following way. I had My MacBook Pro (15”, mid 2012) internal hard drive replaced with 1 TB SSD which had Yosemite installed. The old internal HD was put in a case and from there I moved user accounts and other stuff to the internal SSD with Migration Assistant.


I have repaired disk permissions with Disk Utility to no avail. I have done Reset Home Directory Permissions and ACL's with resetpassword in terminal from Recovery HD to no avail.


The problem seems to be that for some reason OS X can’t get the owner info of the locked file (owner is ”Fetching…”) and because the owner is unknown OS X doesn’t allow anyone (even the root) to change the permissions.


Any I ideas how to solve the problem, i.e. how to correct the permissions of all locked file (in a batch)?

MacBook Pro, OS X Yosemite (10.10.1), null

Posted on Dec 17, 2014 2:27 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 18, 2014 7:43 AM

Back up all data before proceeding.

This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Triple-click anywhere in the following line on this page to select it:

sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. When the OS X Utilities screen appears, select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

resetp

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button.

Select

Restart

from the menu bar.

17 replies
Question marked as Top-ranking reply

Dec 18, 2014 7:43 AM in response to HannuVaakuna

Back up all data before proceeding.

This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Triple-click anywhere in the following line on this page to select it:

sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. When the OS X Utilities screen appears, select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

resetp

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button.

Select

Restart

from the menu bar.

Jan 9, 2015 12:34 AM in response to Linc Davis

Hello Linc Davis, it seems that you're skills are rather prolific in these forums so I thought I might ask for your assistance.


I am having the exact same experience as HannuVaakuna described in his initial post, although the files that I am having this problem with are not within my Home folder, rather they are on an external hard drive.


Might you be able to help me?


Thank you sincerely,


Justin

Apr 3, 2015 11:30 AM in response to Linc Davis

Linc, thank you for this! I've been dealing with a related issue since January when I used Migration Assistant to move from old Macbook Pro to new one. Tried everything I came across as it seemed fairly obvious it was a permissions based issue. I even walked into a local Apple store a few weeks back and they had one of the tech that works at the Genius Bar take a couple minutes with me. He told me it wasn't an Apple based issue and that I needed to contact Adobe and Transmit (the two applications that were causing me the most trouble).


In case it helps someone else... this is the error I would get when attempting to open a file on a remote server vis ftp:

User uploaded file


And here is the error I would get every time I tried to update apps from Adobe Creative Cloud suite:

User uploaded file


Long story short, I came across your post and after reading through most of this thread was hopeful that it would be the fix I needed. I ran your script via terminal and, Voila! I can now access and edit remote files again via Transit Fetch ftp app and Adobe Creative Cloud apps are no longer giving me that dreaded error after attempting to install the updates.


Thank you!


Brian

Dec 18, 2014 12:23 AM in response to Linc Davis

I bit more information.


Permissons of locked files (in home folder) are:

Fetching… : Read & Write

_appleevents: Read only

everyone: Read only


Permissons of unlocked files (in home folder) are:

Hannu (Me): Read & Write

_appleevents: Read only

everyone: Read only


BEFORE Yosemite upgrade the permissons of locked and unlocked files (in home folder) were:

Hannu (Me): Read & Write

staff: Read only

everyone: Read only


It seems that Migration Assistant has changed group permissions from ”staff” into ”_appleevents” (incorrectly?) and messed the owner permissions of locked files.


To my understanding, this boils down to: how can I ”force” new permissions to locked files.

Dec 18, 2014 2:02 PM in response to Linc Davis

Executing the terminal command in step 1

sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

resulted unfortunately in error message:

"UID: Undefined variable."


BTW: What does the command do?

(When I was younger and more patient and developing software, I used CLI a lot, though not on a Unix system. So, you can use technical terms, I probably understand them, and if I don't I'll check them from man pages or google them).

Jan 27, 2015 2:24 PM in response to Linc Davis

Finally,


The long bash command is what did it for me. Just to recap how I ended up here. I replaced the hard drive on my 2010 MacBook Pro (Yosemite). Then I restored a Time Machine Backup onto it. I lost the ability to delete stuff to the trash. Then sometimes I would try to open or change a file and I'd be told I didn't have permissions. I tried all the Reset Home Folder Permissions and ACLs. Ran Disk Utility Repair Permissions etc.


Did it multiple times no effect. If I checked permissions on my home folder it would say "Fetching . . . " so clearly a problem.


The long bash command from Linc fixed everything. Be sure to copy the whole thing. It's wider than the email text box.

Mar 11, 2015 8:00 PM in response to Linc Davis

I just want to say thanks to Linc Davis for solving my problem with the Terminal command above. I had a similar problem as the poster above, but I'll reiterate it here for others:


I set up my new 2014 Macbook Pro, then ran Migration Assistant using a Time Machine Backup (because the Apple store people didn't bother to tell me that I'd need the ethernet dongle in order to migrate directly from my old machine without taking 3 days over wifi).


Migration Assistant forced me to set up a new account, then imported the two accounts I had on the other machine.


Here are the problems I had:


1. I had folders (pics, etc.) full of files that I couldn't see with my new user account (the files appeared in Disk Inventory X, so I knew they were there).

2. I had old user accounts that I couldn't delete, and everytime I restarted I had to go through extra dialog boxes and enter my username and password in order to log them off, too.

3. I also had about 30gb of data in old accounts. Not a huge problem, as I could delete them, but still odd.

4. I had to go through a permissions dialog to move or delete files (this cleared up after running permissions repair in Disk Utilities.


Anyway, using the terminal command that Linc posted fixed everything in a jiffy, and now I have access to all of data and have successfully deleted my old accounts!

Mar 12, 2015 11:18 PM in response to Linc Davis

Worked like a charm. Someone needs to give you an award for your service to the community. I have a new Macbook, decided to start fresh rather than copy over four previous laptops worth of useless applications and etc. but when I used migration assistant to get my documents, then upgraded to Yosemite, I ended up in a permissions tangle. Not sure which was the cause, but now it is fixed.

Jun 10, 2015 7:48 PM in response to Linc Davis

I do apprerciate this information as it helps but I still have issues. Original problem was Spotlight loosing its effectiveness to a point where it would find nothing. Then I could not move to a 2nd level folder in any folder. I could sometimes get Applications but next time around I could not get anything after selecting Applications. I could not go to Library, Home,Documents,Downloads,Movies,Music,or Pictures. I could go to Launchpad and run the apps. I tried numerous times to get permissions verified and repaired. I keep getting "WarningSUID file "System/library/coreServices/RemoteMan....acOS/ARDAgent" has been modified and will not be repaired" I tried to find out what that was to no avail. I read where I needed to delete Finder. Plist but could not find it. Possibly since I could not move around in finder I missed it. Any way Spotlight now works and I can use all of finder but its still not working correctly as I still get the ACL message when I try to repair or verify Permissions. In an effort to clear out any user, Documents,pictures ect I Time Machined back a week. Since I could not revert back to Applications, System or library possibly there is a problem in there. Maybe tomorrow Ill try to re load Yosemite and see if it gets better. Then if it goes well Ill try to reintroduce some of my weeks work. I suspect my Downloads folder as the last thing I did prior to the total Spotlight and 75% of finder was to get two web sites downloads. I am trying to pickup AppleScript and two of the books I have provide companion web site downloads. Sure a publisher would sell space on these site for adds and be vonerable to vicious malware or the destructive stuff. Both web sites are as old as the books and they are 2007-9 vintage. They talk a lot about Snow bird , panther but Not lion or Yosemite. i'm able to determine the older commands and find the newer ones so no big deal. I might tell these publishers that their book download sites are not so good, maybe if I find thats the case.If you have any other ides or stellar works of wisdom let us know.

Jul 12, 2015 5:58 AM in response to VeggieDoug

Is there something similar to this that would fix the "fetching..." problem in the Applications folder? I've got some old apps which store files in the app's own folder inside the Applications folder and I'm unable to edit them due to permissions problems. (For instance, the aging Timbuktu stores it's address book inside the Applications folder, along with a TCP/IP Zones file). The normal Repair Permissions feature of Disk Utility doesn't touch it and neither does the above mentioned Terminal command. Most applications and folders in there say "Fetching..." but some do not. The Applications folder itself does not. But it keeps me from making changes to files.

Repairing permissions when owner is "Fetching..."

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.