Okay, task 1, sudo mkdir p data sales and data account. We might get a message
every now and then in this lab that stuff has already been configured. Just ignore that.
I like to go into the data directory so that we have straight access and we can see what is going on.
So what do we need? We need members of the group Sales to be able to read and write
vals and likewise for account. So let's start with chgrp sils to sils and oops, sudo of course.
And then sudo chdrp account to account.
Now we need to set the permission mode. So sudo chmod770 on
star and LS L is showing that we are already quite good.
Now users will only be allowed to delete files that they have created themselves.
That sounds like sticky bit.
So sudo chmod t on star will do that.
And now the challenging part. User Anna is sales manager and should be able
to manage all sales files. You know how we are going to do that?
Sudo ch's own Anna sils because this is
how it works when sticky bit is supplied.
And now it is.
Then a user can only delete files if the user is owner of the file or if
the user is owner of the directory that contains the files. So now that Anna is owner
of the directory sils, she can delete all files in that directory and that should do it.