LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Default group for Multiple Developers (https://www.linuxquestions.org/questions/linux-security-4/default-group-for-multiple-developers-788088/)

losts 02-09-2010 04:56 PM

Default group for Multiple Developers
 
OK I have multiple developers on a system and I have setup a area on the web server where they all should have access to and all that fun stuff. Now I do not want to setup these developers default group to be this single group cause they could be members of multiple groups...

IE:

/var/www/cust1 - Group Cust1
/var/www/cust2 - Group Cust2
etc...

Then say for the developers:

dev1 - member of Cust1 & Cust2 - Default group is dev1
dev2 - member of Cust2 - Default group is dev2
dev3 - member of Cust1 - Default group is dev3

So when they go into say /var/www/cust1 only dev1 & dev3 should have access to modify files and when they create/edit files the owner should be the user and the group I want it to be Cust1. Then when going to say the Cust2 area new files and stuff have Cust2 group access with RWX.

Is this possible for users to just use their normal accounts, or will I need to look are setting up "project" accounts where they can su into say dev1cust1 account which will have the default group of Cust1?

Let me know how you all handle this and what I might be able to do so that the permissions stick.

Thank you all for any help.

Billy S.

chrism01 02-09-2010 05:56 PM

For dir cust1, create an owner & group cust1 and

chown cust1:cust1grp cust1
chmod g+s cust1

ditto for dir cust2

chown cust2:cust2grp cust2
chmod g+s cust2

http://www.comptechdoc.org/os/linux/..._ugfilesp.html : Directory Set Group ID.

Give dev1 & dev2 grp cust1 as an additional/secondary group; similarly for dev3; add cust2 as secondary grp.
See usermod http://linux.die.net/man/8/usermod

losts 02-09-2010 06:04 PM

Perfect... Thank you... if was the +s part I was missing. Thank you very much :)


All times are GMT -5. The time now is 04:09 AM.