Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 fucked 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 stackoverflow.com May 20 '13 at 13:38

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

add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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