1833760 Members
2203 Online
110063 Solutions
New Discussion

Permissions

 
SOLVED
Go to solution
Tom Dawson
Regular Advisor

Permissions

I'm having a problem with permissions...

UserA has a default group of grpA.
UserB is an member of grpA but it is
not his default group.

UserA creates a file in his home directory.
The group membership of the directory and
the file created are grpA. The permissions
on the directory are 775 and the permissions
on the file are 664.

UserB cannot update this file even though
the directory and file give members of grpA
permsission to do so.

I can use "newgrp grpA" as UserB and then
he can update the file. But I didn't think
I should have to do that if he is a member
of grpA.

Can someone explain to me what is going
on here? Other than making grpA the default
group for UserB, is there some way to avoid
having to execute the newgrp command?

Thanks!
Tom
5 REPLIES 5
Solution

Re: Permissions

Do you have a /etc/logingroup file?

Take a look at the man page for logingroup

If it doesn't exist, only the primary groups permissions are enforced...

If its not there try:

ln -s /etc/group /etc/logingroup


HTH

Duncan

I am an HPE Employee
Accept or Kudo
Joseph C. Denman
Honored Contributor

Re: Permissions

your logingroup is different than the group. To fix your problem, try this:

ln -f /etc/group /etc/logingroup

That should do the trick.

...jcd...
If I had only read the instructions first??
A. Clay Stephenson
Acclaimed Contributor

Re: Permissions

Hi Tom:

You need to create an /etc/logingroup file or better still symbolically link /etc/group to /etc/logingroup. If you are using NIS make sure that you man logingroup and carefully read the NIS warnings about using linked group and logingroup files. It's generally okay but I just want you to be forewarned.

In any event, the logingroup file will fix you.

Regards, Clay
If it ain't broke, I can fix that.
Tom Dawson
Regular Advisor

Re: Permissions

Thanks to all!
We've got it now.

Re: Permissions

Tom you just earn't me my next Hat!

The beers are on me...

;o)

Cheers

Duncan

I am an HPE Employee
Accept or Kudo