Linux file attributes and permissions, Linux file attributes and permissions
1. in Linux, any file has three identities: User, Group, and Others.
2. One of the most useful functions of a user group is that when you develop resources in a team, each account can have support for multiple user groups.
Iii. Linux file attributes:
1. After logging on to Linux as a root user, Run "ls-al" (ls: list) to display the file name and related attributes.-al: lists the detailed permissions and attributes of all objects (including hidden objects ));
- The first letter indicates the file type: d directory
-File
L link file
Interface Devices in device B files that can be stored
C Indicates the serial port device in the device file, such as the one-time reading device, such as the keyboard and mouse ·
- In the next three groups, the first group is the file owner (User) permission, the second group is the same User group (group) permission, and the third group is the permissions of other non-User groups (Others)
2. Column 2: How many file names are connected to this node (I-node)
- Each file records its permissions and attributes to the I-node of the file system. However, the directory tree we use is recorded by the file name, therefore, each file name is connected to an I-node. This attribute records how many different file names are connected to the same I-node number.
3. Column 3: Owner account
4. Column 4: user group to which the file belongs
5. Column 5: capacity, default unit: B
6. Column 6: date of creation or last modification
View the full time ls-l -- full-time
(For garbled characters, you can use "LANG = en_US" to modify the language)
(Modify the system configuration file "/etc/sysconfig/I 18n", use nano to modify the file content, and set "LANG = en_US" to English by default)
7. Column 7: File Name
Rwx: the location will not change. If you do not have the permission, the minus sign (-) will appear (-)
R: read)
W: writeable (write)
X: execute)
Iv. Importance of File Permissions
One of the differences between Linux and Windows: in Linux, many attributes are added to each file, especially the concept of user groups.
1. System Protection (Data Security)
2. teams develop software or data sharing functions
3. Improper permission settings may cause some harm.