The meanings and permissions of the Linux system chmod command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.