Two groups that have different permission to the same directory - it's possible?
Hello everybody.
Example: Two groups (g1, g2) are configured in system. It is possible that these groups have different permissions to the same directory? For example g1: r-x g2: rwx. It is possible to resolv this problem? Best regards. |
it is possible if one group is the owner group and then the other group is just something else. But I guess that wont work for you. hm!
Why do you want to have two groups with different permissions? KAlo |
Quote:
g2 is a group of people that would like to only read files in /home/share directory. Nobody else (others for example) should have any permissions to this directory. Quote:
I just wonder if it's possible in Linux? |
if you want you can use chmod 774 though it doenst create a permission
for the g2 it will set a permission read,write and execute permissions for the user read, write and execute for the group and only read permission for other users. only a suggestion! £Ä3 |
Quote:
Let the folder be owned by the group that needs "rwx" access, and configure it to be "rx" by other groups. This means that *everybody*, not just your "g2", will get "rx" access, maybe that's what bikov_k meant. O well, I tried. |
Quote:
Code:
d---rwxr-x 4 user g1 1024 2004-10-21 17:52 share |
The only way I can think to do this involves an sudo, which I don't know if you are in favor or familiar with. Here's my thought:
[list=1][*]Add all members of both groups to a new (third) group[*]Set the group for this directory to this new group (chgrp newGroup /some/dir)[*]Set the permissions to 750 for the directory[*]Set up an SUDO for the members of g1 to use to be able to write to the directory as the owner of the directory Add something like this with visudo Code:
Cmnd_Alias ALIASEDVI=/path/to/vi alias visharedfile='sudo -u USERTORUNASFROMSUDO /path/to/vi'[/list=1] A thought, not necessarily the best one. |
Quote:
|
All times are GMT -5. The time now is 09:28 PM. |