Raspberry Pi_Eng_13.1.4 Permission System on File


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


13.1.4  Permission System on File

 

The following is a subdivision of the permission information among the above information.

 

r

w

x

r

-

x

r

-

x

read

write

execute

read

write

execute

read

write

execute

owner user permission

owner group permission

other permission

 

The meaning of the permission granted to each user is as follows:

   -    -- None            -- No permission

This means that it have no authority on the file.

 

   r    -- Read            -- Read permission

It means the authority to read contents of file.

 

   w   -- Write            -- Write permission

It means authority to change the contents of the file. It includes both modification and deletion of files.

 

   x    -- Execute         -- Execute permission

This means the authority to perform certain works within the computer by executing a series of commands contained in the file. There is no special meaning for general data files, and it defines whether it have the authority to execute programs which is stored in scripts or written in programming languages such as C, Java, and Python.

 

Each meaning of permissions for file and directory are used somewhat differently. For example, for directory, "execute" has no meaning, but it means the permission to look up directory contents. That is, it means that the directory can be accessed by "cd" command. The following table summarizes the meaning of the each permission for file and directory.

 

permission

file

directory

read 

can read/copy condtent of file

can read list of file or directory in directory

write

can change/modigy the content

can create file or directory in directory

execute

can execute file

can access the directory by "cd" command

 

The privilege for the user is defined individually for the owner user and owner group who own the file, and other users. The privilege is authorized independently for each one:

    Owner user            -- Read permission, write permission, execute permission

    Owner group          -- Read permission, write permission, execute permission

    Other                   -- Read permission, write permission, execute permission

 

What authority a particular user has for a particular file is determined in the following way:

 


 

 

    If a particular user is the same as the owner user, the permission of that owner user is applied.

    If a particular user belongs to an owner group, the permission assigned to the group is applied.

    If a particular user is an owner user and also belongs to an owner group, the permissions assigned to the owner user and the permission assigned to the owner group are applied together.

 

permission

owner user permission

owner group permission

final permission

read

r

-

r

write

-

w

w

execute

-

x

x

                                     

    If a particular user is neither an owner user nor belonging to an owner group, the permission specified in "Other" is appled.