Super User is a question and answer site for computer enthusiasts and power users. 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

How do I change the permissions for a specific group that I have created?

Say for example I create four new users named Anna, David, Carl and Eva and I also create two different groups which I name technician and normaluser. Now when I have created these groups and users I move Anna to the technician group and David to normaluser.

But here is where I'm stuck, I dont know howto give the technician group 'rwx' or full permissions and give normaluser group 'rx' and the rest should just have 'x'.

I've tried with the command chgrp {-R} [group] [file|directory] .. But that kind of messed up my whole system, cause that command changes the group of all the stuff. Also I can't seem to find anything that works with chown {-R} [user]{:group} [file|directory].

share|improve this question

migrated from May 20 '13 at 13:38

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

chgrp will change the group of a file/directory.

then with chmod you can change the permissions of that file/directory for the owner, the group and the rest of the world.

share|improve this answer
The thing is that I don't want to change for every file/directory, but I want to change it so it's permanently for that specific group. So the technicians are practically root, well they should be root if they have rwx on everything. – Nyxion May 20 '13 at 12:21

You can get a finer granularity of permissions by using Access Control Lists (ACLs):

setfacl -m group:technician:rwx,normaluser:rx the_dir

Will set the permissions of the different groups to different values.

share|improve this answer

You must log in to answer this question.