Linux Modify file permission record

Source: Internet
Author: User

1, from the type of file can be divided into three kinds,

With the ls-l query, the "one" begins with the file, the letter "D" begins with the directory (commonly known as a folder), the letter "L" is the beginning of the connection.

2. The remaining 9 are three for a group each group has four symbols consisting of "R", "W", "X", "-" respectively.

R (Read): Delegate Read permission

W (write): Represents the Write permission

X (execuite): Delegate permission to execute

-: The delegate does not have this permission

3. The first group represents what permissions the owner of this file has on this file.

The second group represents what permissions the same group of people in this file have on this file.

The third group represents what permissions a person, other than a group, has on this file.

4. Modify Permissions

You can use command chmod to add permissions to a file

    General modification method:

 chmod +x" file name ": Give everyone (that is, the owner, the same group, people outside the group) plus the rights  

chmod u+x" filename ": Give Yourself the privilege U: On behalf of the user is their own

chmod g+x" file name ": Give Yourself the privilege G: Grup is the same group of people

chmod o+x" filename ": Add permission to yourself O: On behalf of other people

Professional Modification method

Chome 755 file name

Reason: The Modify permission is divided into three 8 binary to represent the

For example:-rwx r-x---This format, can be divided into 0 or one representation, if shown above-the above is indicated by the "1" indicates that there is a corresponding read and write permission.

Binary Octal
111 (RWX) 7
(rw-) 6
101 (R-x) 5
(r--) 4
011 (-WX) 3
010 (-w-) 2
001 (--x)
1
(----) 0

Welcome everyone to visit my personal website Meng Meng's IT People

Linux Modify file permission records

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.