Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder owned by root:admin. I would like to change permissions of all files inside, so I can edit them without sudo, but recursive chmod fails:

$ sudo chmod -R u+w some-folder/

does nothing. Any ideas how to fix it?

At the same time changing permission to a single file works seamlessly.


I installed a Python package from GitHub repository via pip, as an editable install. I am contributing some changes to it, but doing sudo for every edit and every git command is not convenient (I guess - neither safe).


$ sudo chmod -v -R u+w some-folder/

returns nothing.

Path is below:

share|improve this question
You likely want to edit o other permissions and not u user (owner) permissions. Any symlinks in the folder? By default chmod -R does not follow them. – laalto Nov 13 '13 at 11:27
@laalto No symlinks. I do want u permissions (for a file I changed it with u+w I can edit it without sudo). – Piotr Migdal Nov 13 '13 at 11:34
Can you please run sudo chmod -v -R u+w some-folder/ and edit the result into the question? – patrix Nov 13 '13 at 12:22
What are the permissions and owner of the files? e.g. ls -l on the files – Mark Nov 13 '13 at 12:24
@patrix I did it before. And there is no output of any kind. – Piotr Migdal Nov 13 '13 at 12:24
up vote 1 down vote accepted

The issue is that to be able to write to a file you need to be the owner for u permissions or be part of the group for g.

Note as a user you are not root so if owned by root the u permission does not matter. As you are using sudo I assume you are in the admin group (this is not necessarily the case but if anyone alters this I would expect they fully understand these permissions). These files are owned by admin so the permission that matters is the g one.

Thus the chomd you need is

sudo chmod -v -R g+w some-folder/

There are alternatives

  1. As this is where python is installed you should be using pip, easy_install and setuptools to do these updates which will require sudo. Another way is to use virtualenv and so install will be done to your own directories
  2. You can change the owner
    sudo chown -R user some-folder/
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.