What is the meaning and authority of the Linux system chmod command?

  
                

Many users who like to use the chmod command are still not very clear about the meaning and permissions of the chmod command, so they are causing some trouble when they are used. In order to solve the confusion of these users, today Xiaobian will share the meaning and authority of the chmod command with everyone.

For a permission assignment command: sudo chmod -R 764 & times; & times; & times ;; we must understand its meaning:

(1) the meaning of each field: sudo chmod -R (Change folder and its subfolders)

7 (Owner privilege) 6 (Group user privilege) 4 (Other user privilege) xxx (Target file)

(2) First understand The following permission correspondence (execution authority letter indicates the permission meaning execution authority numerical value):

r read right 4;

w write right 2;

x execution right 1;

rwx (read, write, execute)

rw-(read, write)

. . . . . . .

(3) The origin of 7,6,4

To rwx:4+2+1=7; to rw-:4+2=6; to rx:4 +1=5

(4) Common permission commands:

The code is as follows:

sudo chmod 777 -R xxx (Change folder and its subfolders permissions to 777 )

sudo chmod 600 ××× (Only the owner has read and write permissions)

sudo chmod 644 ××× (owner has read and write Permissions, group users only have read access)

sudo chmod 700 ××× (Only the owner has read and write and execute permissions)

sudo chmod 666 ×× × (Everyone has read and write permissions)

sudo chmod 777 ××× (Everyone has read and write and execute permissions

The above is the chmod command The meaning and permissions, users who are not very familiar with the chmod command, come see these, I believe you will know more about the chmod command.

Copyright © Windows knowledge All Rights Reserved