there's a system with two users:
coderb. They both belong to group named
firma. However, when one of them creates a file (in
/tmp) and changes it's group ownership to
rw group permission, the other still cannot write that file... Below is the story in terminal:
codera@vbox:/tmp$ touch file_a codera@vbox:/tmp$ chown codera:firma file_a codera@vbox:/tmp$ ls -al file_a -rw-rw-r-- 1 codera firma 0 xc3xbano 14 20:12 file_a
So, if how I understand it, both the file owner (
codera) and members of the group
firma should be able to read/write that file. Let's try it in second terminal window:
pb@vbox:~$ sudo su - coderb # (then password typed) coderb@vbox:~$ cd /tmp coderb@vbox:/tmp$ ls -al file_a -rw-rw-r-- 1 codera firma 0 xc3xbano 14 20:12 file_a coderb@vbox:/tmp$ id # lets check groups one more time uid=1002(coderb) gid=1002(coderb) groups=1002(coderb),27(sudo),1005(firma),1006(cpp) coderb@vbox:/tmp$ echo hello > file_a -bash: file_a: Permission denied
man acl, after checking whether the user (resp. process) is an owner, if the effective GID or any of the supplementary group IDs match the file group, then those rw- permissions should be applied.
newgrp - firma too... It changed the gid succesfully, but did not help accessing the file. Neither helped rebooting the machine (way to force logout/login them all), or logging in graphically as
Could anybody explain me what did I do wrong or what I missed, please?
Below is info about the OS. It runs in VirtualBox:
coderb@vbox:/tmp$ uname --all Linux vbox 5.8.0-41-generic #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Thank you all for any help.