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