Generally for File or Directory 9- Symbols
Code For Each Permission:
Write(w)-2
Read(r)-4
Execute(x)-1
Ex: - - - - - - - - - -
Here First - Indicates Directory or File
Remaining 9 characters indicate the permission
--> If it is directory it will be like drw--r----
--> If it is directory it will be like -rw--r----
Consider sum of 3 consicute characters as single code
Example: -rw-r--r--
Fisrt Count = rw-
Second Count = r--
Third Count = r--
As per code for this example -rw-r--r--=-420 400 400
First Code 4+2+0=6
Second Code 4+0+0=4
Third Code 4+0+0=4
Total Permision=644
Ex: -rwxrwxrwx=421 421 421
777
Ex: dr-xr-xr-x=401 401 401
555
############################################## All The Best #############################################
Code For Each Permission:
Write(w)-2
Read(r)-4
Execute(x)-1
Ex: - - - - - - - - - -
Here First - Indicates Directory or File
Remaining 9 characters indicate the permission
--> If it is directory it will be like drw--r----
--> If it is directory it will be like -rw--r----
Consider sum of 3 consicute characters as single code
Example: -rw-r--r--
Fisrt Count = rw-
Second Count = r--
Third Count = r--
As per code for this example -rw-r--r--=-420 400 400
First Code 4+2+0=6
Second Code 4+0+0=4
Third Code 4+0+0=4
Total Permision=644
Ex: -rwxrwxrwx=421 421 421
777
Ex: dr-xr-xr-x=401 401 401
555
############################################## All The Best #############################################
No comments:
Post a Comment