Server Fault is a question and answer site for system and network administrators. 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 named docs, how do I add rwx permissions for group devs to docs?

I tried:

chmod -R g+rwx docs

but I don't know where to specify that it's the devs group I want to grant permissions for.

share|improve this question

migrated from Apr 29 '10 at 0:09

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

What you did is right but first you may have to change the group to "devs" with the chgrp or chown command. Note that in unixland a file only has one group.

share|improve this answer
A file/folder only has one group unless you have ACLs turned on. – Chris S Apr 29 '10 at 0:10

You're probably looking for chown or chgrp

share|improve this answer
chown [user]:[group] [file] or chgrp [group] [file] – Chris S Apr 29 '10 at 0:10

You can specify the group of the file using the chgrp command.

share|improve this answer

You probably have umask set to 0022. Do:

umask 0002
chmod -R g+rwx
umask 0022

That should work

share|improve this answer
umask affects file creation. You don't need to change it in order to be able to chmod a file. – Dennis Williamson Apr 29 '10 at 7:30

First thing to do is:

chown -R <user>:devs docs


chmod -R 070 docs

That will give rwx to the group of docs and no permissions to the rest, if you want the owner to have the same permissions then do:

chmod -R 770 docs
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.