1
00:00:06,599 --> 00:00:11,550
An important reason why yoastras are
created is for file ownership, for permissions.

2
00:00:12,509 --> 00:00:16,649
So how does it work? Well, access to
files on Linux is based on file ownership.

3
00:00:17,230 --> 00:00:21,199
And when a user creates a file
on Linux, that user becomes a file owner.

4
00:00:22,140 --> 00:00:27,115
Every Linux user is a member of at least
one group, and while creating a file on Linux,

5
00:00:27,115 --> 00:00:32,090
that group will will become the group owner. We
call that group, by the way, the primary group.

6
00:00:33,049 --> 00:00:36,899
Because of group ownership, every user must
be a member of at least one group.

7
00:00:37,560 --> 00:00:43,534
And most Linux distributions are using private groups for the
primary group. And that means that while creating a user,

8
00:00:43,534 --> 00:00:49,509
a group with the name of the user is created
and the user is the only member of that group.

9
00:00:50,329 --> 00:00:57,255
That doesn't sound very useful, but it's mainly because
of the requirement that users must be a member of

10
00:00:57,255 --> 00:01:04,180
a group. And you want this group membership to
be as secure as possible. Let me show you.

11
00:01:05,620 --> 00:01:11,469
So I'm going to use sudo su
Linda. That's a little trick that allows

12
00:01:11,469 --> 00:01:17,319
me to use my sudo privileges
to open a shell as user Linda.

13
00:01:18,540 --> 00:01:24,633
And now I'm in my User Linda
shell. Who am I confirming? That ID is

14
00:01:24,633 --> 00:01:30,726
showing my current configuration where we can
see that the user ID1001 has the name

15
00:01:30,726 --> 00:01:36,819
Linda. The GID1001 is the primary
group, which also has the name Linda.

16
00:01:37,200 --> 00:01:44,115
And here groups is a list of all groups that user
Linda is a member of. That's not very impressive, but that's

17
00:01:44,115 --> 00:01:51,030
a default situation. Create a user. The user will become
a member of a group with the name of that user.

18
00:01:51,489 --> 00:01:57,976
Now I'm using Touch lynda file and what do
we see when we use LS L? We see

19
00:01:57,976 --> 00:02:04,463
that lynda file is owned by user Linda and
group owned by the group Linda. And that's how

20
00:02:04,463 --> 00:02:10,949
ownership is used when files are created. More
about ownerships and permissions will follow in later videos.

21
00:02:11,669 --> 00:02:15,930
Let me use Exit because I don't have
to be in the user Linda shell anymore.
