Can't tag local Documents folder : Error -8058

I wanna use Finder tags to organise my Mac with using "Groupe by" feature. Everything is fine, except for one folder : the "Documents" folder, located in my personal folder. (Note : this folder is on my local machine and is not synced with iCloud "Documents" folder.)

Whenever I try to tag this folder, Finder raises an error : "The operation can't be completed. An unexpected error occured (Error code -8058)."

Error screenshot - FR

Is this folder corrupted ? What can I do to solve this problem ?

Thanks !

System Information :

  • macOS Big SUr 11.5.1
  • MBP 13" 2018, 4 Thunderbold ports
  • 2,3 GHz Intel Core i5 4 core
  • 16 Go 2133 MHz LPDDR3
  • Finder version 11.5

What I tried :

  • Restart computer
  • Remove ~/Library/Preferences/com.apple.finder.plist and his lockfile + Restart

I observed :

  • Unlike any other folder, I can't view/edit acces rights for my Documents folders (see pic)

Folder details


Without getting into the details of why in macOS Big Sur you cannot apply a Tag to the Documents folder, and until there is a more direct solution, here is a workaround that worked for me.

Note that these directions assume that one is the Admin and logged into an Admin account.

Please read this entire answer before proceeding and make sure you have a full backup of the entire contents of the Documents folder before processing these directions!

  1. From Finder, in your Home folder, create a temporary folder outside of the Documents folder to move the entire contents of your existing Documents folder to.
  2. Press the keyboard shortcut ⇧⌘. to show hidden Finder items, if they are not currently showing.
  3. Move the entire contents of your existing Documents folder to the temporary folder, the one you just created for this task, by using ⌘A to select all Finder items, then drag and drop the Finder items into the temporary folder created for this task.
  4. In Terminal, from your Home directory, create a directory named D using the following command: mkdir -m 0700 D
  5. In Finder, in your Home folder, add the Tag(s) to the D folder that you would like to have on the Documents folder.
  6. Make sure you have moved the entire entire contents of your existing Documents folder to the temporary folder created for this task. (Warning!)
  7. In Terminal, from your Home directory, run the following commands:
  • NOTE: This will delete the existing Documents directory and rename the D directory to: Documents
chmod -N Documents
rm -r Documents; mv -v D Documents
chmod +a "everyone deny delete" Documents
killall Finder
  1. Back in Finder, move the entire contents of your previous Documents folder, from the temporary folder created for this task, to the new Documents folder.

  2. Delete the temporary folder previously created for this task after making sure it's empty.

  3. Press the keyboard shortcut ⇧⌘. to hide hidden Finder items, if that be your preference.

That's it, you are done, and the Documents folder has Tag(s).


Notes:

If/when you want to change/modify/remove the Tag(s) on the Documents folder, you will need to replicate the directions herein.

These directions were tested in a clean install of macOS Big Sur 11.5.2, with Language & Region settings in System Preferences set to English (US) — Primary and worked for me without issue1.

  • 1 Assumes necessary and appropriate settings in System Preferences > Security & Privacy > Privacy have been set/addressed as needed.

Additionally, I do not use iCloud and I'm logged in using a local Admin account without being signed in using my Apple ID, if any of that might matter to the successful execution of these directions.

enter image description here