cannot set up UMASK or groups so that users from one group cannot access other groups

cannot set up UMASK or groups so that users from one group cannot access other groups

Post by yft » Wed, 20 Jan 1999 04:00:00



Hi

First let me describe what I would like to set up to clarify things:

Scenario:

I would like to set up 3 groups, lets call them A, B, C. Users from A should
have access files created by users in B or C. Users in B or C cannot access
files created by users in A. Also users in B or C should not have access to
each others files.

How would I set up Umask to handle this? I've tried to create a primary
group for all and secondary groups to reflect the permissions I'm after, but
to no avail.

Any ideas?

Many thanks in advance.

Jon

 
 
 

cannot set up UMASK or groups so that users from one group cannot access other groups

Post by Barry Margoli » Wed, 20 Jan 1999 04:00:00




>I would like to set up 3 groups, lets call them A, B, C. Users from A should
>have access files created by users in B or C. Users in B or C cannot access
>files created by users in A. Also users in B or C should not have access to
>each others files.

Do yo mean read-write or read-only access?

Quote:>How would I set up Umask to handle this? I've tried to create a primary
>group for all and secondary groups to reflect the permissions I'm after, but
>to no avail.

Each user should just have a primary group, no secondary group (at least
not among A, B, or C).  The directories of the B and C users should have
group-id A and mode 2770 or 2750, depending on the answer to the above
question.  The users' umasks should be 007 or 027, again depending on the
answer to the question.  The set-gid mode on the directories will cause all
files created to be put in group A (even though the B and C users
themselves aren't in that group), which will allow the A users to access
them.

This was definitely a tricky one, and I was actually surprised that it's
possible.

Note that users in B cannot access other B users' files, and similarly C
users can't access each others' files.  Your problem statement wasn't clear
on whether this is OK -- did you mean only that B users shouldn't be able
to access C files and vice versa?  In that case, it should be much simpler.
B and C users should just have a primary group, while A users should have
secondary groups B and C.  Each user's directory should be in their primary
group with mode 0770 or 0750, and the umasks should be the same as in the
above solution.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.

 
 
 

1. user and group management - how to emulate groups into groups in linux ?

Hi

What is the best practice in organizing users in the following case :

A linux system will be used for a school.
There are students in IT, Math and Physics sections.
For each section there are 4 years of studies  : 1st year, 2nd year,
3rd year, 4th year.
Some programs can be used only by students in 2nd year, or only by
students in physics, etc.

I want to assign permissions on groups to these programs.

I want to add users into the following groups :

it_year1, it_year2, it_year3, it_year4,
math_year1, math_year2, math_year3, math_year4,
phys_year1, phys_year2, phys_year3, phys_year4.

and then create groups for each section and each year :

it_students, physics_students, math_students,
year1, year2, year3, year4.

The problem is that in linux it is not possible to add a group in
another group :
it_year1 is part of year1 and it_students.

A possible solution would be to add users directly into each group but
that
will not make user administration easy. It is by far easier to add a
user in one group and make him inherit
automatically other group membership than by adding a user in several
groups, with the risk of forgetting one.

So what is the best solution to this user/group management problem in
linux ?

Thanks in advance

2. SLS vs. Slackware

3. grouping a group to a group?

4. alternative to "sleep"

5. Keeping groups, groups and groups straight

6. pppoE on solaris, Roaring penguin!

7. GROUPS CONTAINING OTHER GROUPS (/etc/group)

8. hidden dependencies, WTH?

9. /etc/group groups inside of groups?

10. POLL: Do you use BSD group semantics + private groups + umask 002

11. LOCAL (TX): Announcing Linux Users Group in Midland/Odessa Texas (Permian Basin Linux Users Group)

12. Group Access control - 100 groups

13. Group without access to /etc/groups