On my HD, I have a bunch of files that I've generated via Python scripts (or otherwise). When I run "open foo.png" from terminal (or via finder), I get a popup that says

The file “foo.png” couldn’t be opened because you don’t have permission to view it.

However, via chmod or 'Get Info', I do theoretically have permission to view it. The file is also unlocked, and sudo doesn't solve the problem either. The file isn't corrupt (I can view it elsewhere). I've also played the 'repair permsissions' game.

I've exhausted my google-fu on possible problems. Ideas?

  • Does apple.stackexchange.com/questions/209686/… help?
    – nohillside
    Commented Nov 26, 2015 at 13:56
  • 1
    Just for future info: repair permissions does nothing for files not installed by the OS X installer, or a software update. It has no clue what the correct permissions are for your personal files. Commented Nov 26, 2015 at 15:12
  • For totally mysterious reasons, everything works fine again. I came to work the day after this question was posted, and all my files work for the nonce. If the problem reoccurs, I'll update.
    – Excalabur
    Commented Nov 30, 2015 at 8:08
  • I have a similar problem after copying some files from an old hard drive to my mac. I don't understand but the permissions are ok and I must sudo to do what I want. - Permissions are 777 - I'm the owner - The file is not locked in finder Commented Jan 13, 2017 at 5:24

1 Answer 1


Try to access to the file on the terminal with the root access

Open the Terminal, input "sudo -s" . And, after that, try to open the file.

  • As mentioned in the question, sudo doesn't solve the problem, either via a root shell (sudo -s) or just 'sudo open foo.pdf'.
    – Excalabur
    Commented Nov 27, 2015 at 1:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .