LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Question about chmod and group priv's (https://www.linuxquestions.org/questions/linux-general-1/question-about-chmod-and-group-priv%27s-524438/)

Thaidog 01-31-2007 01:46 PM

Question about chmod and group priv's
 
If you are using chmod with the root user and you do a chmod g=wrx which grouo is it giving those permissions to?

Obviously there are more than just one group and I was wondering how to assign specific permissions per group. (like burning or audio... etc)

MOS JEFF-INITELY 01-31-2007 02:39 PM

It depends on which group owns the file.

for example:

if group microsoft owns the file GETVISTA you would be changing permissions for that group on the file :

>ls -al | grep GETVISTA
-rw-r--r-- 1 billygates microsoft 0 2007-01-31 15:33 GETVISTA

>whoami
root

>chmod g=wrx GETVISTA
-rw-rwxr-- 1 billygates microsoft 0 2007-01-31 15:34 GETVISTA

however if another group owns the file.. that group would have access.

hope this helps.

ease-e

kaz2100 01-31-2007 02:55 PM

Hi,

I am having a little bit difficulty understanding second part of original question.

If g=rwx, this means that the group of the file, (seen by ls -l) has that permission.
And /etc/group defines which user belongs to what group.

I do not think any group owns file, as suggested by #2 line 1.

Happy Penguins!

Thaidog 01-31-2007 03:18 PM

Quote:

Originally Posted by kaz2100
Hi,

I am having a little bit difficulty understanding second part of original question.

If g=rwx, this means that the group of the file, (seen by ls -l) has that permission.
And /etc/group defines which user belongs to what group.

I do not think any group owns file, as suggested by #2 line 1.

Happy Penguins!

Let me put it like this then... How do I assign a file to a specific group? (Giving only that group access to the file rwx)

anomie 01-31-2007 03:21 PM

You can use:
Code:

chown :group_here file_here
If you need to restrict permissions from others, use
Code:

chmod o-rwx file_here

MOS JEFF-INITELY 01-31-2007 03:24 PM

chgrp <newgroup> GETVISTA

and I think you took my words a little too literally the original creater owns the file (unless changed) .. the users in the group can have access to the file.

Billy G for President.


All times are GMT -5. The time now is 01:28 AM.