cancel
Showing results for 
Search instead for 
Did you mean: 
  • 730 Views

ex200 permission understanding

Jump to solution

I am studying towards ex200 exam on rhel9. And I am stuck with this group shared folder setup

If I want to group share files(with modify access to same group members), the instruction given to me is to set SGID(chmod g+s), but even after that same group member is denied modifying a file created by a user in the same group. 

[root@server2 ~]# ls -l /group
total 0
drwxrwsr-x. 2 bill  consultants 6 Nov  7 09:06 consultants
drwxrwsr-x. 2 betty trainers    6 Nov  6 18:30 trainers
[root@server2 ~]# ls -l /group/consultants/
total 0
[root@server2 ~]# su - bob
[bob@server2 ~]$ touch /group/consultants/bob1
[bob@server2 ~]$ ls -l /group/consultants/
total 0
-rw-r--r--. 1 bob consultants 0 Nov  7 10:15 bob1
[bob@server2 ~]$ id
uid=1003(bob) gid=1005(bob) groups=1005(bob),1004(account),1012(consultants) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[bob@server2 ~]$ exit
logout
[root@server2 ~]# su - bill
[bill@server2 ~]$ touch /group/consultants/bill1
[bill@server2 ~]$ ls -l /group/consultants/
total 0
-rw-r--r--. 1 bill consultants 0 Nov  7 10:23 bill1
-rw-r--r--. 1 bob  consultants 0 Nov  7 10:15 bob1
[bill@server2 ~]$ 

 And that is true as I don't see Write access given to the group, but that is all the instruction I am given. Am I supposed to change umask too to achive this?

1 Solution

Accepted Solutions
Elankumaran
Mission Specialist
Mission Specialist
  • 715 Views

Will changing the umask from 022 to 002 work?

View solution in original post

4 Replies
Elankumaran
Mission Specialist
Mission Specialist
  • 716 Views

Will changing the umask from 022 to 002 work?

  • 683 Views

Not sure if that instructions provided were correct, I am studying with Oreilly contents. but thank you, I tried and umask defaulting 002 solved it. 

0 Kudos
shashi01
Moderator
Moderator
  • 674 Views

@larsmattim 

It's good to hear that setting the umask to 002 resolved your issue. This change would typically be made to facilitate a more collaborative environment where members of the same group need to edit and manage files and directories together.

If you have any more questions or need further assistance with your studies or understanding Unix/Linux permissions, feel free to ask!

Chetan_Tiwary_
Moderator
Moderator
  • 701 Views

Yes @larsmattim ! Check your default umask value and adjust it as per the need. 

Join the discussion
You must log in to join this conversation.