An important reason why yoastras are created is for file ownership, for permissions.
So how does it work? Well, access to files on Linux is based on file ownership.
And when a user creates a file on Linux, that user becomes a file owner.
Every Linux user is a member of at least one group, and while creating a file on Linux,
that group will will become the group owner. We call that group, by the way, the primary group.
Because of group ownership, every user must be a member of at least one group.
And most Linux distributions are using private groups for the primary group. And that means that while creating a user,
a group with the name of the user is created and the user is the only member of that group.
That doesn't sound very useful, but it's mainly because of the requirement that users must be a member of
a group. And you want this group membership to be as secure as possible. Let me show you.
So I'm going to use sudo su Linda. That's a little trick that allows
me to use my sudo privileges to open a shell as user Linda.
And now I'm in my User Linda shell. Who am I confirming? That ID is
showing my current configuration where we can see that the user ID1001 has the name
Linda. The GID1001 is the primary group, which also has the name Linda.
And here groups is a list of all groups that user Linda is a member of. That's not very impressive, but that's
a default situation. Create a user. The user will become a member of a group with the name of that user.
Now I'm using Touch lynda file and what do we see when we use LS L? We see
that lynda file is owned by user Linda and group owned by the group Linda. And that's how
ownership is used when files are created. More about ownerships and permissions will follow in later videos.
Let me use Exit because I don't have to be in the user Linda shell anymore.