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?
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!