1830333 Members
2042 Online
110001 Solutions
New Discussion

Permissions

 
SOLVED
Go to solution
chrizz
Occasional Advisor

Permissions

We've got quite a strange problem on our hands here. We are running an HP 9000/800 B.11.00.
I've just created a new group in /etc/group which i called, let's say newgroup . Then I added 4 users to the group, namely user1, user2, user3, user4 . The command grpchk shows no strange things (the maximum one of those users is used in other groups is 14 times, the group newgroup is the 40th group I've created in /etc/group)
Then I created a new directory on the server called updir . In that directory I've created an other directory called lowdir . Then I gave the following commands:
chown -R user1:newgroup /updir
chmod -R 770 /updir
Now when checking the permissions for the 2 dirs they give the exact same result (770 & user1:newgroup). All seems fine...
But the problem is that only user1 can enter /updir and the /updir/downdir.
User2, user3 and user4 can only enter /updir, NOT the /updir/downdir... very strang.
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: Permissions

What's the output of:

# id user1
# id user2
# id user3
# id user4
# ll -d /updir
# ll -d /updir/lowdir
(or ll -d /updir/downdir -- whichever is correct since you mention both in your message)

A. Clay Stephenson
Acclaimed Contributor

Re: Permissions

When you say you added user2,user3, and user4 to newgroup, does that simply mean that you have simply listed user2,user3, and user4 in newgroup's /etc/group entry or dies that mean that you have changed user2's, user3's, and user4's primary GID in their passwd eentry to be newgroup's GID? Those are very different things. To make you scheme work automatically (without requiring an explicit newgrp command), you need to link /etc/group to /etc/logingroup. Man 4 group for details.
If it ain't broke, I can fix that.
uadm26
Super Advisor

Re: Permissions

chrizz,
Look you need to logoff that users, user1 user2 user3 and user4. Then at new login execute command:
id user2 (for example)
The "newgroup" must be appear in user information, if not you do something wrong when editing the /etc/group.

Good luck,
Joel
chrizz
Occasional Advisor

Re: Permissions

I have found the problem thanks to your help! The whole time I was testing with my useraccount which I hadn't checked for number of groups I was in. When I used the command id username I saw that newgroup wasn't listed and I started counting the other ones (20 in total)
I would like to apologize for my stupid mistake, thank you very much for everyones time!