Professional Documents
Culture Documents
Class 11 Permission and Special Permission
Class 11 Permission and Special Permission
Permission
Types of permission
Mkdir /software
Ls -l or ll (long listing)
rwxr-xr-x = permission
. = + = ACL
2 = subfolder
Root = owner
root = group
6 = size in byte
Software = name
1. Numerical method
2. Symbolic method
1. Numerical method
Read = r =4
Write = w = 2
Execute = x = 1
No permission = - = 0
Rwx = 4+2+1 = 7
r-x = 4+0+1 = 5
r-x = 4+0+1 = 5
rwxr-xr-x =755
r-- = 4
-wx = 3
--x = 1
--- = 0
-w- = 2
Rwx—x—x = 711
Change the permission = chmod (change modification)
Rwxrwxrwx = 777
2. Symbolic method
Privilege user = root = user = u
Non-privilege = group = g
System user = other = o
U=rw g = w o=rwx
U= x , w = x , o =x
Chmod u=x,g=x,0=x /software
Chmod ugo=x /software
Ugo = a
Chmod a=x /software
Chmod -x /software
Special permission
Suid = set user identification
Sgid set group identification
Sticky bit
SUID = set user identification = it is use to give privilege user permission to all non-privilege user . Kernel
understand it by 4 no .
Root = usradd , groupadd , init 6 , init 0
Ducat =
Sudo
Groupadd = which groupadd
/usr/sbin/groupadd
Ll
rwxr-xr-x = 755
chmod 4755 /usr/sbin/groupadd
rwsr-xr-x = s show in 1 block means suid applied
s = suid + execute
S = suid
Sgid = set group identification = apply same group to subdata , kernel understand it 2 no
Group = IT
User -= aa bb
Usermod -G IT aa
Mkdir /data
Chgrp IT /data
S = SGID
s = execute + suid
Sticky bit = only owner can delete the data . kernel give it 1 no .
T = sticky bit