Thursday, December 13, 2012

OSX 10.8.x - Permission denied writing to home directory.

I was getting the following error after a fresh install of OSX 10.8.x:

jemurray@dsg:~ $ touch test
touch: test: Permission denied

Looking at the basic permission I see:

jemurray@dsg:/Users $ ls -al
total 0
drwxr-xr-x   5 root      admin   170 Dec 11 16:15 .
drwxr-xr-x  30 root      wheel  1088 Dec 13 16:15 ..
-rw-r--r--   1 root      wheel     0 Jun 20 15:00 .localized
drwxrwxrwt   3 root      wheel   102 Dec 11 16:08 Shared
drwxr-xr-x@ 24 jemurray  staff   816 Dec 13 09:01 jemurray 

Looking at the extend permissions on the home directory I see:

jemurray@dsg:~ $ ls -lea
total 112
drwxr-x---@  24 jemurray  staff    816 Dec 13 09:01 .
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown

This is incorrect, it should be:

jemurray@dsg:~ $ ls -ale
total 112
drwxr-x---@  24 jemurray  staff    816 Dec 13 16:35 .
 0: group:everyone deny delete


The problem was fixed by running this command:

cd ~
sudo chmod =a# 0 "group:everyone deny delete" .

It works:

jemurray@dsg:~ $ touch test
jemurray@dsg:~ $ 


Followers

Contributors