Introduction to Linux system permissions (1)

Source: Internet
Author: User
Introduction to Linux system permissions (1) Linux system permissions:
(1) A single file has three groups: users, groups, and others.
Each group has three permissions: Read R, write W, and execute x
That is to say, a file has nine permission attributes.
From left to right, one to three are [users], four to six are [groups], and seven to nine are [others].
For example, if you open any file using the rootexplorer manager, you can see its permission: RW-r -- rwx.
This means that [users] have read and write permissions on them, [groups] have read permissions, and [others] have read and write execution permissions.
(2) Correspondence between permissions and numbers
Many times, in order to easily write scripts and use terminals, people use numbers to indicate the permissions of files! (For example, in Android development You can use "chmod 777 file path" to change the File Permission to read and write for all groups .)
Correspondence between numbers and permissions:
Read r = 4
Write W = 2
Run x = 1
A total of three numbers represent the permissions of the three groups. The size of each number is equal to the sum of the three permissions contained in each group.
For example, if the permission of a file is RW-rwx-r-X, the number of the file is 675.
Indicates [user] Reading and Writing [group] Reading and Writing execution [other] Reading and Writing execution.

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.