Hi and welcome back to this video.
So in this lesson, we are going to learn Linux permissions
through octal way. So basically
we are going to give the permissions using
numbers. So let's see quickly how
to do that.
Now one thing that you need to remember is
till now we have seen how to
give the permissions using rwx correct,
and we know that
there are three people which is you g o which
is the user group and others.
We have also seen that there are three types
of permissions which is read
write and execute now.
What special in this Linux permission using
octal way? You have to remember a
lucky number, which is 4 2 1
you always have to remember this in case
here as you can see.
R which is the read represents the
number four
W which is the right represents the number 2 and
X which is the execute represents the
number one perfect. So, this
is I hope this is clear with
everyone now.
Let's move forward.
so
in case we need to give this permission
to a file XYZ, which is read write
execute read write execute and read
write execute which means we are giving basically all
the permissions to everyone here. We
need to represent it using octal Ray.
Yes, so for that we need to give seven to
the first block, which is the user
second block also gets 7 and the
third block also gets a seven now. You
must have guessed it right from where
did the seven come four plus
two plus one gives seven. That means
are four W two
x one four plus two
plus one is seven. Hence. The user gets
on the first block permission 7 the group
gets the permission seven and others
also get the permission 7 hence. Now
the command that we need to gift
on to the terminal is chmod 777
and the final name XY said
to give the permission
To a file which is reiterate execute read write execute
read write execute. Perfect. I
hope this is clear with everyone of you. We are
doing the same thing but using numbers this
time.
Alright, so I hope you guys understood how we
can give permissions using octal way.
Thank you.