1
00:00:06,839 --> 00:00:13,304
Okay, task 1, sudo mkdir p data sales
and data account. We might get a message

2
00:00:13,304 --> 00:00:19,769
every now and then in this lab that
stuff has already been configured. Just ignore that.

3
00:00:20,850 --> 00:00:25,910
I like to go into the data directory so that we
have straight access and we can see what is going on.

4
00:00:26,710 --> 00:00:33,359
So what do we need? We need members of
the group Sales to be able to read and write

5
00:00:33,359 --> 00:00:40,009
vals and likewise for account. So let's start with
chgrp sils to sils and oops, sudo of course.

6
00:00:41,390 --> 00:00:45,969
And then sudo
chdrp account to account.

7
00:00:46,810 --> 00:00:52,740
Now we need to set the
permission mode. So sudo chmod770 on

8
00:00:52,740 --> 00:00:58,670
star and LS L is showing
that we are already quite good.

9
00:00:59,850 --> 00:01:04,109
Now users will only be allowed to
delete files that they have created themselves.

10
00:01:04,790 --> 00:01:06,329
That sounds
like sticky bit.

11
00:01:07,230 --> 00:01:13,709
So sudo chmod t
on star will do that.

12
00:01:14,909 --> 00:01:18,784
And now the challenging part. User Anna
is sales manager and should be able

13
00:01:18,784 --> 00:01:22,659
to manage all sales files. You know
how we are going to do that?

14
00:01:23,170 --> 00:01:27,704
Sudo ch's own Anna
sils because this is

15
00:01:27,704 --> 00:01:32,239
how it works when
sticky bit is supplied.

16
00:01:33,180 --> 00:01:33,840
And now
it is.

17
00:01:34,599 --> 00:01:39,976
Then a user can only delete files if
the user is owner of the file or if

18
00:01:39,976 --> 00:01:45,353
the user is owner of the directory that
contains the files. So now that Anna is owner

19
00:01:45,353 --> 00:01:50,730
of the directory sils, she can delete all
files in that directory and that should do it.
