Tuesday, August 25, 2020

UNIX COMMAND & SECURITY SYSTEM PART - 4

 


Security system in Multi user system

First we talk about the security system of file.

Security system of file means no other user are otherwise to access the file of another user.

Let we understand command:

Command : $  ls  -l

Here :

 ls  - same as dir command in dos

-l  - for log listing of file.

Output of Command [ $  ls  -l ]

_rwxr_xr_x  3  amit  staff  411  datetime   a1

drwxr_xr_x  2  amit  staff  411  datetime   a2

---------          ----           ---------        ---------

DETAILS:

MODE OF FILE Such as:

_rwxr_xr_x

drwxr_xr_x 

NUMBER OF LINK Such as:

3

2

OWNER Such as:

amit

amit  

GROUP Such as:

staff  

staff  

SIZE OF FILE Such as:

411

411

COMMAND Such as:

datetime   

datetime   

FILE NAME Such as:

a1

a1


NOTE:

_rwxr_xr_x  3  amit  staff  411  datetime   a1

drwxr_xr_x  2  amit  staff  411  datetime   a2

Here:  _  Means ordinary files

            d  Means directory

            b  Means block read file (Such as: HDD , CDROM , Secondary Device)

            c  Means character read file (Such as: modem , printer etc). These files are also called device driver files. They are available in dev directory.

Suppose:

 


Note: Each file must have their Owner and Group. as above figure show.


SYMBOL                MEANING                                 NUMERICAL VALUE
      _                         No Permission                                           φ
      r                         Only read is Permitted                             4
      w                        Only write is Permitted                            2    
      x                         Only Execution is Permitted                    1                        

Form above it is clear that the numerical value of maximum number of permission is not more than ( 0 + 4 + 2 + 1 ) =7  for any owner , group and others of a file.

Detail information is given in the figure given below 👇


If we have any file than we can do following things such as :


Note: Maximum Possible Permissions are : 7 7 7

Example:

  


NOTE ABOUT GROUP:

Suppose we have three groups:

STAFF             ACCOUNTS                STORE        Group name                

amit                       amit                              raj

ajay                        anil                              raja

raja                        sumit                           ajay

  -                               -                                  -

  -                               -                                  -

Only administrator can create a group.

Only administrator can create user / login and associate to some group.



No comments:

Post a Comment