2

I use Spotlight to open folders, but quite often the Finder opens on ~/ instead of the folder I was looking for. I realised it happens when I try to reveal a folder which lies in ~/Documents/. Revealing a folder somewhere else, eg ~/Music/iTunes works like a charm. But something like ~/Documents/foo/ falls back to ~/.

It might have happened for the first time after a system update, a few weeks/months ago. I am currently running macOS 11.2.1.

I suspected privacy privileges, and I reset them with tccutil reset All but it hasn't changed anything.

Interestingly, it seems like I'm not able to change the permissions of ~/Documents/, while it is possible for other folders (see example below).

Missing permission management for ~/Documents (left) but not ~/Music (right) Permission management is missing for ~/Documents (left), but is there for ~/Music (right)

Does anyone have an idea to explain this behaviour, and how to solve it? I'll be much grateful for any hint.

Edit 2021-02-15 Out of the blue, I tried something. I used the action Reveal in Finder of Alfred on a folder in ~/Documents/. It worked, and, since that, so does opening folders from a Spotlight search. It must have done something backstage, but I have no idea what. ¯_(ツ)_/¯

Edit 2022-07-24 See the answer from @junjie below for the real cause of the problem and a workaround.

6
  • tccutil doesn't reset perms on your user folders, it's for application perms. idk how to fix your issue, but your perms are wrong on both those folders. I suspect Music has an ACL, but idk what happened to Documents. Default perms on user folders should only say 'me' read & write, everyone no access.
    – Tetsujin
    Commented Feb 13, 2021 at 18:57
  • I can confirm that my Documents folder also has no permissions section
    – Ezekiel
    Commented Feb 13, 2021 at 23:02
  • Thank you for your comment @Tetsujin. I tried tccutil because I thought Spotlight needed to be granted particular access like other apps. I reset the ACL (Recovery Mode > Terminal > repairHomePermissions) but still it is not possible to open in Finder a folder from ~/Documents with Spotlight. :/
    – Ben
    Commented Feb 14, 2021 at 6:43
  • Which version of macOS are you running @EzekielElin?
    – Ben
    Commented Feb 14, 2021 at 6:44
  • @Ben I'm on the latest version of Big Sur
    – Ezekiel
    Commented Feb 14, 2021 at 14:27

4 Answers 4

4

I've figured out the problem. Looks like it had nothing to do with permissions of the Documents folder. The problem seemed to be related to the use of Column view in Finder. If you switch the view of Finder to the List view, Show in Finder/Reveal in Finder will work properly for files in the Documents folder. Hat tip to the Alfred team for discovering this workaround.

enter image description here

1

The iCloud option for me only worked once then it stopped working again for ~/Documents folder.

I encounter this issue first from terminal, IntelliJ and VSCode (using open command in terminal and reveal option in these editors)

for example using open -R ~/Documents/path/to/folder or open ~/Documents/path/to/folder/file won't open these in Finder but would Finder at this ~/ path and this happens only when the files are in ~/Documents and in columns mode weirdly it works okay in list mode

anyway the fix that worked for me, is to add ~/Document folder to the sidebar and then it works fine but the minute you remove ~/Document folder from the sidebar it stops working again, not sure why this is the case

Again: add the Documents folder to the sidebar/favourites for the fix

0

There are two questions here:

Firstly, Spotlight always sending you to ~/ (and not the folder you asked for) is I believe a bug.

Update: I have a MacBook running macOS 11.3 beta1. On this the search behaves correctly and Finder opens in the expected folder. So, it seems this bug is being fixed.

Secondly, my interpretation of permissions for ~/Documents is that Big Sur has taken control of the Documents folder and won't let you make changes. Unix style permissions and ACLs are overruled by macOS.

There is other evidence for the special role of ~/Documents. Finder now shows subfolders that are not really inside the Documents folder. These are folders belonging to some apps using iCloud for document storage.

There seems to be no way of turning back the clock and restoring the behaviour of Catalina and older. This is just an example of Apple gradually taking away the freedoms we have come to love in macOS.

1
  • Thank you for your answer. If the problem comes from Big Sur taking more controls on folders, and not on my side only, that's already a good thing. Frustrating, though. I'll wait a bit for macOS 11.3 to be released and see if the problem is fixed. In the meantime, I'm curious to know if someone is experiencing the same issue.
    – Ben
    Commented Feb 14, 2021 at 6:52
0

I encountered the same bug since macOS 11.2 or maybe earlier. Spotlight list results but won't reveal any file in ~/Documents, it always open ~/ folder instead. It annoyed me a lot.

The first workaround I tried was to create a new folder ~/Docs, and move everything from ~/Documents into, it works well but not perfect though.

I believe some core services must be doing little dirty stuff to "overrulled" Unix file system as Gilby replied. iCloud Drive become No.1 suspect in my mind. Just go to: System Preference > Internet Accounts > iCloud > check iCloud Drive > Options, check "Desktop & Documents Folders" and uncheck again to turn it on and off manually. Wola! The ~/Documents folder now displayed as "Documents - Local" in Finder (as well as ~/Desktop), and revealing in Spotlight works again finally!

PS: It's recommended to empty both Desktop and Documents folder first, thus no time wasted on syncing several GB files with iCloud.

You must log in to answer this question.

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