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
RW X correct.
And we know that there are three people, which is U, 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 to 1.
You always have to remember this in case here as you can see R which is the read represents the number
for W which is the right represents the number two 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 X, Y, Z, 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 way.
Yes.
So for that, we need to give seven to the first block, which is the user.
Second block also gets seven and the third block also gets a seven.
Now, you must have guessed it right from where did this seven come?
Four plus two plus one gives seven.
That means r4w2x1, four plus two plus one is seven.
Hence the user gets on the first block permission seven the group gets the permission seven And others
also get the permission seven Hence now the command that we need to gift on to the terminal is c mod
seven, seven, seven and the final name x, y, z to give the permission to a file which is read,
write, execute, read, write, execute, read, write, execute.
Perfect.
I hope this is clear with every one of you.
We are doing the same thing, but using numbers this time.
All right.
So I hope you guys understood how we can give permissions using Oracle way.
Thank you.