sobota 12. februára 2022

Linux binary permission

only for physical explanation :-) (Only notes to me) 






 - =0

r or w or x =1


rwx = 111

rw- = 110

r-- = 100

r-x = 101


-wx =011

-w- =010


--x =001

--- =000


rwx

111 bin to dec


111 

cba = 2 (bin)

a0

b1

c2


cba = 2 (bin)

a0 = 2 to0 =1

b1 = 2 to1 =2*1 =2

c2 = 2 to 2 =2*2=4

1+2+4=7



rw-

110 bin to dec

cba = 2 (bin)

a0 = 0to0 =0

b1 = 2to1 =2

c2 = 2to2 =4

0+2+4=6



r-- 

100 bin to dec

cba = 2 (bin)

a0 = 0to0 =0

b1 = 0to0 =0

c2 = 2to2 =4

0+0+4=4


-wx 

011 bin to dec

cba = 2 (bin)

a0=2to0 =1

b1=2to1 =2*1=2

c2=0to0 =0

1+2+0 =3






-w-

010

cba = 2 (bin)

a0=0to0 =0

b1=2to1 =2

c2=0to0 =0



--x 

001

cba =2 (bin)

a0=2to0=1

b1=0

c2=0


--- 

000

cba = 2(bin)

a0 =0

b1 =0

c2 =0


more helpful: https://linuxcommand.org/lc3_lts0090.php




Žiadne komentáre:

Zverejnenie komentára