0

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].

2 Answers 2

0

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.

1
  • 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
    Commented May 20, 2013 at 12:21
0

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.

You must log in to answer this question.