Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

binba

macrumors newbie
Original poster
Jul 23, 2010
27
6
Just updated a Mac Mini from 10.5.2 to 10.5.7 with the latest patches & security updates.
Permissions on my Documents folder are broken beyond belief:

I have one user on this machine, let's call it john. With admin privileges. Not secure, but it couldn't be simpler from a permissions perspective.

  1. In Finder, everything appears to be fine. Can traverse, view, and write in it.
  2. In Terminal (and other apps that try to write to the Documents folder), I can traverse, write and delete, but not read.
  3. ~/Documents/ls : ls: .: Operation not permitted
  4. ~/ ls Documents : ls: Documents: Operation not permitted
  5. ~/ ls -le: drwxr-x---@ 9 john staff 288 Dec 29 19:56 Documents
  6. whoami : john
  7. sudo su: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  8. pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  9. Then if I cd / and cd back to exactly where I just was... those errors go away.
  10. ls as su? You guessed it, "Operation not permitted".
  11. Inspected POSIX+ACL permissions in Terminal and with TinkerTool. john is the owner, has r+w access, etc.
  12. Folders had an everyone: deny delete ACL, but removing it didn't matter. Changing staff from no rights to read-only didn't matter either. For both ~/ and ~/Documents. Same behavior.
  13. Tried without ACLs, with explicit allow-everything to john - no change
  14. All other home folders (Movies, Pictures, etc.) appear to be fine.
  15. Tried Disk Utility first aid, no change.
  16. Tried Recovery mode + repairHomePermissions tool, no change.
  17. Haven't tried the deprecated diskutility repair permissions terminal command. Of course at this point Apple pulled the permissions repair documentation, because of course, permissions issues in Catalina do not exist. :)

I'm really not in the mood to reinstall the OS now..... I might limp along for a while ignoring the Documents folder if I can help it - everything else seems to be fine, bizarrely. Wanted to see if anyone had any other insights.
 

barbu

macrumors 65816
Jul 8, 2013
1,263
1,052
wpg.mb.ca
If sudo won't let you fix or modify the folder, can you boot into single user mode and deal with it there? Copy out any files and then just delete it. Reboot and see if you can recreate it in your home folder.
 

Erehy Dobon

Suspended
Feb 16, 2018
2,161
2,017
No service
Personally I would use the brute force UNIX method to fix the ownership.

Make a backup first, then in a terminal window

cd /Users sudo chown -R john:staff john

and reboot.

If that doesn't work, perhaps there's some preference that is completely corrupted. Or you could mess with read-write-execute permissions. That's even more extreme than changing ownership.

cd /Users sudo chmod -R u+rw john

If it still is borked, create a new user account, log into that and see if it behaves normally. If the answer is still No, then reinstall macOS.

Best of luck.
 
Last edited:

chrfr

macrumors G5
Jul 11, 2009
13,707
7,277
Just updated a Mac Mini from 10.5.2 to 10.5.7 with the latest patches & security updates.
Permissions on my Documents folder are broken beyond belief:

I have one user on this machine, let's call it john. With admin privileges. Not secure, but it couldn't be simpler from a permissions perspective.

  1. In Finder, everything appears to be fine. Can traverse, view, and write in it.
  2. In Terminal (and other apps that try to write to the Documents folder), I can traverse, write and delete, but not read.
  3. ~/Documents/ls : ls: .: Operation not permitted
  4. ~/ ls Documents : ls: Documents: Operation not permitted
  5. ~/ ls -le: drwxr-x---@ 9 john staff 288 Dec 29 19:56 Documents
  6. whoami : john
  7. sudo su: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  8. pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  9. Then if I cd / and cd back to exactly where I just was... those errors go away.
  10. ls as su? You guessed it, "Operation not permitted".
  11. Inspected POSIX+ACL permissions in Terminal and with TinkerTool. john is the owner, has r+w access, etc.
  12. Folders had an everyone: deny delete ACL, but removing it didn't matter. Changing staff from no rights to read-only didn't matter either. For both ~/ and ~/Documents. Same behavior.
  13. Tried without ACLs, with explicit allow-everything to john - no change
  14. All other home folders (Movies, Pictures, etc.) appear to be fine.
  15. Tried Disk Utility first aid, no change.
  16. Tried Recovery mode + repairHomePermissions tool, no change.
  17. Haven't tried the deprecated diskutility repair permissions terminal command. Of course at this point Apple pulled the permissions repair documentation, because of course, permissions issues in Catalina do not exist. :)

I'm really not in the mood to reinstall the OS now..... I might limp along for a while ignoring the Documents folder if I can help it - everything else seems to be fine, bizarrely. Wanted to see if anyone had any other insights.
Did you grant Terminal access to your Documents folder in the Security and Privacy System Preference? This sounds like what you have going on.
 
  • Like
Reactions: barbu
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.