User Groups In Linux, every user must belong to a group, and there are three types of groups in Linux, as follows:
File Owner: User group: Other groups: How do we view the currently logged in user and the group to which the user belongs? Enter the terminal and enter the following command: 1. View the logged in user name? If you want to view the corresponding detailed information further, you can enter the following command: 1. cat /etc/passwd|grep loguser to capture detailed information of the user#The echo information is as follows: >>loguser: x : 889 : 600 : : /home/loguser:/bin/bash Username: Password: User ID: Group ID: Remarks: User home directory: The directory where the shell is located2. cat /etc/passwd|grep weblogic to capture detailed information of the user group weblogic: x:500:600::/weblogic:/bin/bash #The corresponding relationship is consistent with the user's relationship. Why do we talk about groups? In fact, it is closely related to the permissions discussed next. File permissions Every time we view the specific details of the files in the current directory through ll, we can see the following at the beginning of the file: drwxrwxrwx lrwxr-xrw- As shown in the figure, there are 10 digits in total. Excluding the first digit, the remaining 9 digits start from left to right, and every three letters represent a category. It seems that there are three groups in total, and the three categories here correspond to the user groups above: Remove the first letter:
The first digit represents the type of file:
Let's continue to discuss the meaning of the three letters rwx: r (Read): For files, it has the permission to read the file contents; for directories, it has the permission to browse the directory. The above rwx actually has the following corresponding relationship: Each letter corresponds to a number Students who have studied computer principles must be very familiar with 8421. In fact, this almost corresponds to this meaning. 1. Method 1 to modify permissions: chmod 755 abc 2. Method 2:
The above is a summary of the Linux user groups and permissions that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: JS object copying (deep copy and shallow copy)
>>: Mybatis+mysql uses stored procedures to generate serial number implementation code
Table of contents 1. React.Children.map 2. React....
First: Installation of MySQL Download the MySQL s...
The specific code of JavaScript date effects is f...
Preface When using Docker in a production environ...
In the past, float was often used for layout, but...
When making forms, we often encounter the situati...
** Detailed graphic instructions for installing y...
A few days ago, I saw an example written by @Kyle...
Table of contents 1. Preprocessing 2. Pretreatmen...
The element ui table does not have a built-in dra...
This article introduces the method of using CSS3 ...
question The code has no prompt: Many non-front-e...
What is a carousel? Carousel: In a module or wind...
Table of contents 1. Basic concepts and basic com...
CSS3 achieves cool 3D rotation perspective 3D ani...