1 2 Previous Next 18 Replies Latest reply: Nov 13, 2012 8:14 PM by Steve Jolly
Steve Jolly Level 1 Level 1 (35 points)

A problem has abruptly appeared and keeps (unpredictably) recurring.  When I edit a file and then save the modified version of that file, something breaks and when I try to reopen the file, later, I get a "you do not have permission to open this file" message. And the file can't be opened.

 

If I restart my MacBook Pro, the problem will usually disappear for a while, then begins to pop up again.

 

I've been running Mountain Lion since shortly after it was introduced. This is a new problem (never encountered it in 25 years with Macs; this began a few days ago) and has me baffled.


MacBook Pro, OS X Mountain Lion (10.8.2), Quad i7 16GB RAM 2GPU's 1GB vidRAM
  • 1. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    Updating -- Still having the problem. I'm re-describing it to improve clarity:

     

    I'm running Mountain Lion (10.8.2 latest mod) on a fast quad i7 mid-2012 MacBook Pro.

     

    Occasionally,  I'll edit a file and then save a modified version (as, for example, a .pdf).

    When I try to open the modified version of the file, later, I get a "you do not have permission to open this file" message.

     

    If I restart my MacBook Pro, the problem will disappear for a while (the files CAN be opened), but, then the permissions quirk begins to pop up again.

     

    I've been running Mountain Lion since shortly after it was introduced. This is a new problem (never encountered it in 25 years with Macs; this began a few days ago) and has me baffled.

  • 2. Re: Recurring file-permissions problems
    Linc Davis Level 10 Level 10 (118,295 points)

    Does this happen only with one application, or with more than one?

  • 3. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    A number of them. Preview is a particular problem, giving me the "...you don't have permission to open it" message fairly often. But it could just as well be a file saved in Photoshop or exported from Quark. There may well be some applications and file-types that don't develop the permission symptoms, but I haven't (yet) noticed any such pattern.

     

    It almost never occurs until I've been using the MBP for several hours. Once it starts, it becomes increasingly pervasive until I shut down. Or restart.

     

    Perhaps predictably, I verified today that if I log out and then log back in, I can open the previously no-permission files. Eventually, the problem starts to recur. Baffling.

  • 4. Re: Recurring file-permissions problems
    Linc Davis Level 10 Level 10 (118,295 points)

    Problems such as yours are sometimes caused by files that should belong to you but are locked or have wrong permissions. This procedure will check for such files. It makes no changes and therefore will not, in itself, solve your problem.

    First, empty the Trash.

    Launch the 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. Click Utilities, then Terminal in the icon grid.

    Triple-click anywhere in the line below to select it, then drag or copy it — do not type — into the Terminal window:

    find . $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 -o -acl \) 2> /dev/null | wc -l

    Press return. The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.

    The output of this command, on a line directly below what you entered, will be a number such as "35." Please post it in a reply.

  • 5. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    Thanks, Linc. FYI, I'm familiar with your (many) contributions here.    ;-)

     

    Also, I'm familiar with Terminal and most other utils; I've had Macs for 25 years, used to code, and I don't panic in the face of some simple UNIX. Can follow your instructions. Again, thanks!

     

    ---------------

     

    Having said all of that...

     

    The reponse from Terminal to your command after copy/pasting it into Terminal (also tried simple dragging, just in case there was an obscure difference, and got the same response) was:

     

         Ambiguous output redirect.

     

    ... and waiting for another prompt. No numerical output.

  • 6. Re: Recurring file-permissions problems
    Linc Davis Level 10 Level 10 (118,295 points)

    I re-tested the command, and it's correct. Please follow the instructions exactly and try again. If it still doesn't work, post a screenshot of the Terminal window showing what you did.

  • 7. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    LInc, while I'm doing that, I have screenshot the Get Info window on my Macintosh HD.  Note "shared folder" box being checked, and the "custom access" above the Sharing and Permissions window. Are these as expected?  Here's the screenshot...

    Screen Shot 2012-11-13 at 5.13.43 PM.png

     

  • 8. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    ...And here's the terminal screenshot, as requested:

     

    Screen Shot 2012-11-13 at 5.22.06 PM.png

  • 9. Re: Recurring file-permissions problems
    Linc Davis Level 10 Level 10 (118,295 points)

    No, it's not correct. Repair permissions in Disk Utility.

  • 10. Re: Recurring file-permissions problems
    Linc Davis Level 10 Level 10 (118,295 points)

    You're running the C shell, not the default bash shell. Type "sh" at the prompt (without the quotes), then press return and try again.

  • 11. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    Result:

    Screen Shot 2012-11-13 at 5.31.55 PM.png

     

    Guidance?  In well over my head, now.

  • 12. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    Also -- ran Repair Permissions in Disk Util, late yesterday, no change in problem. Run it again?

  • 13. Re: Recurring file-permissions problems
    Linc Davis Level 10 Level 10 (118,295 points)

    Back up all data now.

    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've 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. If none of this is meaningful to you, you don't need to worry about it.

     

    Step 1

    Launch the 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. Click Utilities, then Terminal in the icon grid.

    Drag or copy — do not type — the following line into the Terminal window, then press return:

    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null

    Be sure to select the whole line by triple-clicking anywhere in it. You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning. If you don’t have a login password, you’ll need to set one before you can run the command.

    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.

    Step 2

     

    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.

    When the OS X Utilities screen appears, select Utilities Terminal from the menu bar. A text window opens.

    In the Terminal window, type this:

    resetpassword

    That's one word with no spaces. Then press return. A Reset Password window opens. You’re not going to reset a password.

    Select your boot 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.

    When that's done, launch Disk Utility and repair the permissions of the boot volume.

    Select  Restart from the menu bar.

  • 14. Re: Recurring file-permissions problems
    Steve Jolly Level 1 Level 1 (35 points)

    I will back up the volume and then follow the steps. Thanks!

     

    Here's a bit of additional info. Probably this is all irrelevent, but just in case something triggers an alarm bell...

     

    1)  This mid-2012 MBP (non-retina) was ordered from a 3rd-party vendor, MacMall, not Apple. There was a brief delay in the shipment that made me a bit uneasy.

     

    When it arrived it did not appear to be entirely virgin. There was unexplained minor time logged on the machine, about 10 battery cycles shown, and I had to go through some extra steps to set up my user account and delete what appeared to be some leftover traces of a previous admin account. I didn't worry about it at the time; there were no signs of mischief and, since it was just about the top-end machine orderable without going to the Retina (I passed on the MBPR because I needed the upgradeability of the "legacy-style" MBP), I just assumed that someone at Apple or MM were doing a little quality-control or perhaps curiosity benchmarking on a fast unit that came through the line. I immeediately took it up to 16 GB RAM with Crucial and added a 1 TB internal drive. It certainly worked flawlessly, and, until the permissions problems appeared, even better than flawlessly.

     

    2) One minor oddity. After a couple of weeks, I built a Mountain Lion bootable USB 3 thumb-drive to allow running Disk Warrior (they still haven't released it on bootable media) and other maintenance without going to the recovery partition. When I booted from it and checked the  Mac-HD settings, I noted that "Ignore ownership on this volume" was checked, which in my experience is unusual.

     

    See anything in any of this?

1 2 Previous Next