Hey guys, welcome back. In this video we're going to learn how to create new groups
and why we would do that. So, for a moment before we do this we gotta talk about
file permissions again and this is something we covered very early on, but
it actually is relevant now. So, I'm gonna create a file here called text, and if I
actually am going to make a directory here called groupstuff and change into group
stuff. I want to things better organized here. Then, I'm going to list the directories here.
You'll see 3 fields here basically it's read/write, read/write, read and what
this means is owner, group, and everyone else. So, I'm actually gonna play around
with the user account that I created a few videos ago, and so what we're going to do is add
that user to a specific group. So, right now this is owned by the user
so this becomes relevant to this section, the group here becomes relevant
to this section.
So, I'm actually going to change ownership of just the group here of this
file. So, I'm going to "chown"
So, I actually need to create the group first, good stuff. So, now we're going to
create the group and how you do this type "sudo groupadd tt" that's gonna be
the name of the group for whatever reason, and now we run "chown nickjermaine:tt text" on this file.
So, now it's owned by my current user account as well as the group which has
read-write access, so now if we add our second user account to that group, and
then login as that second user, and attempt to edit the file we should be
able to because we should have read-write access. So, in order to add a user
to a group we already learned that actually. So, let's go ahead and "sudo adduser nick3 tt"
Now, if I change user to nick3 I should be able to edit that file without problems,
without using sudo. CTRL+O save and exit. That's a really fundamental reason why
groups are used, and it may be relevant to you it may not entirely be, but it's
still good to know how the system works with permissions. So, I hope this actually
you know made more sense of the permissions from the previous videos. I
tried to explain it the best I could then, and maybe seeing this will help you guys
get it. So, that's all for this video,
thanks for watching.