Step 1: I used the command, sudo groupadd -g GID GroupName, to create three groups, employee, payroll, and admin.

Step 2: Sophia account-

Olivia account-

Emma account-

Step 3:

Step 4: I used the command, sudo mkdir /home/cyse_project, to create the directory, and sudo chgrp jkaur005 /home/cyse_project, to change the directory’s group owner.

Step 5: I used the command, sudo chmod 770 /home/cyse_project, to change the directory’s permissions, and ls -ld /home/cyse_project, to check its new permissions.

Step 6: I used the command, umask 027, in Sophia’s account to change the permissions of new files or directories, then I used ls -l testfile, to check the permissions of the new file.

Step 7: I went into Vi editor to add my name to the Sophia_homework file, and used cat Sophia_homework to check the file’s contents, and ls -l Sophia_homework to check permissions.

Step 8: I used the command, cp Sophia_homework /home/cyse_project, to copy the file into the project directory. I should have used the command, ls -l /home/cyse_project, to check the file’s permissions in the project directory, instead I accidently checked the file’s permissions in the Sophia account.

Step 9: I used the command, cat Sophia_homework, in the Emma account to read the file, but I received a permission denied error.

Step 10: I used the command, exit, to leave Emma’s account, and once again to leave Sophia’s account.
Step 1B: I used the command, sudo chmod g+s /home/cyse_project, to set the correct SGID group values to the directory.

Step 2B-3B: I used the command, cp Sophia_homework /home/cyse_project/Sophia_homework2, to copy the file into a new file in the project directory. Then I entered Emma’s account, and used cat Sophia_homework2 to view the new file’s contents.

Step 1C: I used the command, sudo chmod g-s /home/cyse_project, to remove the SGID permission from the directory.

Step 2C-3C: I used the command, cp Sophia_homework /home/cyse_project/Sophia_homework3, to copy the file’s contents into a new file in the directory. Then I switched to Olivia’s account and used cat Sophia_homework3 to view the contents of the file, but permission was denied.
