Whenever we give permission to the folder or anything, we usually write 777.
Here are three 777.
First seven means permission is giving to User(Owner)
Second seven means permission is giving to Group
Third seven means permission is giving to Others
so 777 means UGO
now comes to each 7. what the means of 7?
each 7 consist read, write or execute permission.
read(r) : 4
write(w) : 2
execute(x) : 1
Suppose, if we want to give read, write and execute permission then
read + write + execute (rwx) => 4 +2 + 1 => 7
read + write (rw) => 4 + 2 => 6
read + execute (rx) => 4 + 1 => 5
write + execute (wx) => 2+1 => 3