LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble understanding chmod & group permissions (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-understanding-chmod-and-group-permissions-207030/)

gen-ik 07-19-2004 01:42 PM

Trouble understanding chmod & group permissions
 
I have now read many tutorials about Linux user and group administration, but I still don't completely understand the group permissions. For example, I can give a group write rights by

Code:

chmod g+w [filename]
but what I don't understand is:

- to which group does it apply?
- can I specify one specific group or does it apply to all groups (that wouldn't make any sense, would it)?
- how do I give a specific group a right to create new directories under a specific directory?

jim mcnamara 07-19-2004 01:46 PM

Code:

ll t.lis
-rw-r--r--  1 jmcnama    prog        12014 Jul 16 15:40 t.lis

jmcnama is the owner
prog is the group

You're changing the access for whatever group the owner of the file belongs to.

jim mcnamara 07-19-2004 01:49 PM

You can change the group of the file as well, if you want the file to be accessible to a group that is different from the one the owenr belongs to.

Code:

chgrp bin t.lis
and now the "bin" group has group access.

gen-ik 07-19-2004 01:51 PM

Quote:

Originally posted by jim mcnamara
Code:

ll t.lis
-rw-r--r--  1 jmcnama    prog        12014 Jul 16 15:40 t.lis

jmcnama is the owner
prog is the group

You're changing the access for whatever group the owner of the file belongs to.

So for example if I want to give access to the group "squid" to a directory "cache" and all its subdirectories I have to do

Code:

chown -R squid cache
chmod g+rwx cache

? And root still has all access rights to everything no matter what I do?


All times are GMT -5. The time now is 06:58 PM.