1849278 Members
6936 Online
104042 Solutions
New Discussion

Users group access

 
Jagadesh
Frequent Advisor

Users group access

Dear All,

I need to create two groups (grp1 and gr2) with some users(user1, user2...), the users in one group should not be able to read or edit other group files.

user1 in grp1 alone should be able to access grp2 files.

How can i go about in doing the same.

Thanks
2 REPLIES 2
MarkSyder
Honored Contributor

Re: Users group access

By access do you mean read?

grp1 have exclusive access to their own files: make file permissions rwxrwx--- (770 octal).

grp2 files are to be read by grp1: make file permissions rwxrwxr-- (774 octal).

chmod 770 (filename)

Make adjustments as necessary if, for example, the files are not executable.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
RAC_1
Honored Contributor

Re: Users group access

You control this with perms on file owned by respective groups.

Add user1 as follows.
His primary group will be grp1 and secondary group grp2.
He will be able to access files owned by grp2.
Make sure /etc/logingroup is linked to /etc/group

Anil
There is no substitute to HARDWORK