I am attempting to conceptualize how to go about solving this task. First, here is the task in full.
RHCSA7: Task of the day Allowed time: 10 minutes. Create two new user accounts "steve" and "oliver". Create a group "team". Create a directory "shared". All files put into the "shared" directory by "steve" or "oliver" should belong to the "team" group and be only visible by them. I know how to create the new users, folder, and group. From what im reading, it sounds like the group should have two members, Steve and Oliver. I would also give the shared directory ownership by root and assign it to the group of team. But, what im really having trouble understanding is how to approach the last line in the task:
All files put into the "shared" directory by "Steve" or "Oliver" should belong to the "team" group and be only visible by them.
What immediately comes to mind is that I should use the Set GID option with chmod. Because I have added Steve and Oliver to the group team, I could use the following command
chmod g+s shared Since i assigned the shared directory to the group team this would assign all new files and directory's added to the shared directory to the same group, team.
Is this the correct approach, or a working solution to this task?
As a tidbit, the portion that reads should only be visible by them ... should i read this as only having read access? If this was the case, then no new files or directories would be added unless they are added by the root user.