Linux permission modification command

grammar:

  chmod value filename

 

example:

  chmod 644 mm.txt

  After the command is executed, the permission value of the file mm.txt is rw-r--r--

 

Detailed explanation:

        The permissions are divided into three types: read, write, and execute, which are represented by the letters r w x and have different weights;

  Its permissions are r=4, w=2, x=1

  4+2+1=7 for rwx attributes;
  4+2=6 for rw- attributes;
  4+1=7 for rx attributes.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325386351&siteId=291194637