Linux permission Summary

Source: Internet
Author: User

What is a triplet, such as R-X, rwx, ---, and-WX Are All triplet.

Used to indicate the user's permissions on files or folders.
Any file or folder contains three tuples, which are for the owner, group, and other users.
The operations in each triple are read, write, and execute in sequence. The possible values in each position are R (-) | W (-) | x (-), "-" indicates no. It is similar to three placeholders and uses 1 and 0 to indicate whether they are available.
Use chmod to change permissions. You can use LS-L to view permissions.

-----------------------------------------------
Two Methods of permission Representation

1. Symbolic notation (recommended, highly readable, and difficult to write)

$ LS-L/bin/bash
-Rwxr-XR-x 1 root wheel 430540 Dec 23/bin/bash
The rest of the field consists of three triple characters. The first three-character group represents the permissions of the file owner, the second represents the permissions of the file group, and the third represents the permissions of all other users:
"Rwx"
"R-X"
"R-X"
Above, r indicates that read is allowed (View data in the file), w indicates that write is allowed (modify and delete files), and X indicates that execution is allowed (runProgram). By putting all this information together, we can find that everyone can read and execute the file, but only the file owner (Root User) can modify the file in any way. Therefore, although you can copy the file, only the root user is allowed to update or delete it.

Note:
The first character (-) in this field specifies the file type. In this example, it is a regular file. Other possible first characters include:
"D" Directory
"L" Symbolic Link
"C" character dedicated Device File
"B" Special Device Files
"P" first-in-first-out
"S" socket

2. There is also a common method of permission-the use of the syntax called the number permission syntax, the value of each bit represents the sum of the values of the triples read and write execution in the "Symbol Expression.
Mode Number
Rwx 7
RW-6
R-x 5
R -- 4
-WX 3
-W-2
-- X 1
--- 0

Note: Many permission modules are referred to the Linux digital permission method http://www.cnblogs.com/highriver/default.aspx? Ref = setskin

 

 

 

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.