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:~ $ 


3 comments:

  1. Thanks a ton - saved my day! :)

    ReplyDelete
  2. Discover how a security and home automation system from Honeywell is the best way to protect your home and family and save on energy costs. You can also ... security companies in okc

    ReplyDelete
  3. Every individual, family and community needs adequate security in order to live in peace and comfort as required. Business and life will thrive and communities will prosper when there is adequate security. home security systems arizona

    ReplyDelete

Followers