2

I do know how to set permissions. But what is the default OS X permission and ownership for one's home directory. I can't create a dir. How is mine different? (See snippet):

jbenniMac:~ jbenni$ pwd
/Volumes/Macintosh HD/Users/jbenni
jbenniMac:~ jbenni$ ls -l ..
total 0
drwxrwx---@ 101 jbenni  staff  3434 May 14 17:15 jbenni
jbenniMac:~ jbenni$ mkdir test
mkdir: test: Permission denied
jbenniMac:~ jbenni$ 

Also:

jbenniMac:~ jbenni$ ls -ledO@ /Users/jbenni
drwxr-xr-x+ 13 jbenni  staff  - 442 Mar  9 15:52 /Users/jbenni
 0: group:everyone deny delete

Note: 1) There are other miscellaneous symptoms. E.g., Bash complains about not being able to create a sessions folder, and I get a spurious "StartupItems" has wrong permissions at login (even though it doesn't). I suspect all these are related.

Note: 2) Long ago, and several versions of OS X ago, I installed an SSD for my system and applications. I relocated my Home directory (using the Users and Groups, "Advanced Options...", then browsing to a location on the builtin hard disk for my home directory). That's been working fine, and life is good in the Finder. I don't use Terminal often enough to know for sure when this prob. started - but Terminal has worked subsequent to the SSD/HDD separation.

  • What does id -a return? Is it just the name test which fails or any name? What is the result of touch test? – nohillside May 15 '16 at 17:34
  • Can't create any directory inside Home without using sudo. touch test returns "Permission denied". id -a returns the expected list of ids. The id for jbenni is 504. mkdir and rm both work with sudo. – jbbenni May 15 '16 at 22:23
  • 1
    Ah, note #2 is actually rather important. Which filesystem does the HD have? With which options is it mounted? – nohillside May 16 '16 at 4:56
  • The HD is "OS X Extended", writeable, not case-sensitive. It's disk0s4, internal via SATA. (All disks are "clean" with respect to Disk Util's First Aid.) – jbbenni May 16 '16 at 13:34
3

The answer was provided by fd0 who posted it on SuperUser. The problem turns out to be caused by conflicting ACLs, and was solved by removing them all. (Apparently resetpassword as suggested above did not clear these ACLs. I don't know why.) The terminal command that revealed the conflicting ACLs was:

ls -ledO@ "/Volumes/Macintosh HD/Users/jbenni"

The terminal command that fixed the conflict (by removing all) was:

chmod -N "/Volumes/Macintosh HD/Users/jbenni"

I hope this helps someone else. I was chmod aware, but didn't have a working knowledge of ACLs - so I never would have found this on my own. Stackexchange rocks!

  • Nice find. Glad you got it :) – Tetsujin May 17 '16 at 8:48
1

Defaults should be rwxr-xr-x user staff

You can reset user defaults from Recovery...

  • Reset Home folder permissions & ACLs
    This has become more complex since El Capitan because of System Integrity Protection, but is still possible by booting to Recovery Mode...
    1. At boot, hold Cmd ⌘ R at the chimes
    2. At the recovery screen, open Terminal from the Utilities menu.
    3. Type in resetpassword and hit Return\Enter. A Reset Password window opens.
    4. Select your username from the drop-down menu labeled Select the user account (NOT System Administrator/root).
    5. Click the Reset button at the bottom of the window in the Reset home folder permissions and ACLs section.
    6. Quit the Password Utility and go back to the main recovery screen.
    7. On your keyboard, press Cmd ⌘ Q and restart your computer (or Select  > Restart from the menu bar). It's very important that you don't hold down the power button to exit the recovery session, or the ACL reset won't be performed.
  • Neither /Users nor the individual home folder are protected by SIP, so why not just run chmod 755 ~? And how does this help here anyway, the users seems to have write access to the home folder already (and the only ACL doesn't prevent folder creation by the user either)? – nohillside May 15 '16 at 17:33
  • Onyx can no longer reset them without going through this - so I'm pretty sure it's doing something more than just blanket chmodding everything to 755 [I can't prove it, cos my nix chops are terrible, but if it could be done before SIP & can't be done now, that's my logical conclusion] – Tetsujin May 15 '16 at 17:42
  • 1
    I just tried, chmod'ing your own home folder works as expected :-) There might be more to this (and it might even solve the OP's problems), but right now it looks a bit like magic to me. – nohillside May 15 '16 at 17:46
  • @patrix - Have you tried xattr ? It's not something I really want to play with, cos if I break it I will then own two halves ;-) – Tetsujin May 15 '16 at 17:54
  • 1
    I did reset the user defaults from Recovery - carefully being sure to exit properly. No change. (I didn't actually change the password, just the home folder permissions and ACLs - which appeared to complete properly.) – jbbenni May 15 '16 at 22:27

You must log in to answer this question.

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