Many users who prefer to use the chmod command are still not very clear about the meaning and permissions of the chmod command, so they cause a certain amount of trouble when used. In order to solve the confusion of these users, today's small series with you to share the next chmod command meaning and permissions.
For a permission Assignment command: sudo chmod-r 764xxx; We must understand what it means:
(1) Meaning of each field:sudo chmod-r (change folder and its subfolders)
7 (Owner rights) 6 (Group User Rights) 4 (other user rights) XXX (target file)
(2) First understand the following permissions correspondence relationship (Execute permission letter means permission meaning Execute permission numeric representation):
R Read right 4;
W Write right 2;
x executive right 1;
RWX (read, write, execute)
rw-(Read and write)
。。。。。。。
(3) Origin of 7, 6 and 4
to rwx:4+2+1=7; to rw-:4+2=6; to r-x: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 600xxx (only the owner has read and write permissions)
sudo chmod 644xxx (owner has read and write permissions, group user only Read permissions)
sudo chmod 700xxx (only the owner has read and write and Execute permissions)
sudo chmod 666xxx (everyone has access to read and write)
sudo chmod 777xxx (everyone has read and write and Execute permissions
The above is the meaning of the chmod command and permissions, the chmod command is not very familiar with the user, take a look at these, I believe you will be more understanding of the chmod command.
The meanings and permissions of the Linux system chmod command