Permissions in Linux
Here I take a tomcat directory example. First we execute the command in linux system:ls -l
We come up with one explanation -rwxr-xr-x
, the Linux system is to distinguish between user privileges, ie user, group of users, other users, the first digit indicates the type of file, -代表文件,d代表目录,
each additional user accounts 三个字符
, here -rwxr-xr-x
correspond to the following relationship
Meaning Explanation
The first: - represents the file, d for directory
user, group of users, none of the other users rwx form, where r denotes read, w for write, x for executable, - indicates no authority to take the user group, for example, can only be r appears in the first position, w can only appear in the second position, x can only appear in the third position.
If we character appears (which may be r, w, x) is represented as 1, appears - represented as 0, then the corresponding binary follows, r - - = 100, - w - = 010, - - x = 001, converted to decimal, then read = 4, write = 2, executable = 1, will be converted to the following relationship
That digital user rights abbreviated here, we can reverse propulsion digital rights, such as data 6, we convert binary: 110, converted to: rw-, having read, write permission.
Now that we have learned in the title: -rwxr-xr-x permissions meaning, and here it is the digital shorthand -755, there is also need to be rewritten to 0755, where 0 can be simply interpreted as a decimal