Linux:: Permissions: [1]: Identity description of file visitors under Linux: Group of three! [Supplement: Classification of user types under Linux! 】

Series article description

Preface: This article is the content of the basic Linux operation chapter!
The environment I use is based on Tencent Cloud Server: CentOS 7.6 64bit.


Study set recommendations:



Preface

In the previous content sharing, the author mainly shared the basic instructions about Linux command line operations! Including: 用户账户管理指令, 目录/文件的创建拷贝、移动、删除等指令, 文件内容的条件式查看指令, 日期日历指令, 文件查找 / 文件内容过滤查找等指令, 压缩解压 / 打包解包指令, so far, we have introduced the instructions that can be used at this stage! The other instructions involve subsequent content, so they will be continuously updated according to the progress of content sharing!


Starting from this article, the author will share content related to permissions under Linux in recent issues! At this point a general understanding is needed: Linux 下一切皆文件!


1. User type classification and user switching under Linux

Linux is a multi-user operating system!


Classification:

  • 超级用户: There is only one, with the highest permissions under Linux (generally not restricted by permissions)
  • 普通用户: There can be multiple, subject to permission restrictions!

Regarding user switching, I have already shared it in the basic instructions! 点击查考, here is just a brief review!

  • 指令:su name
  • 作用:用户类型切换
  • Notes:
    (1) The root user can switch directly to any user without entering a password.
    (2) To switch between non-root users and to switch from an ordinary user to a root user, you need to enter the corresponding password!
    (3) If there is no password when switching users, you can first switch to the root user, and then switch to the password-less user through the root user. [Note: In actual enterprises, it is generally impossible for us to have the opportunity to enter the root user to operate! Therefore: please remember your password!
  • 用户回切快捷方式:cd -

2. Identity description of file visitors under Linux: Group of three!

1. "Group of three": classification and description of each visitor's identity

There are three types of file visitors (ugo):

  • u —— user: Owner of files and file directories
  • g —— group: Users in the same group as the owners of files and file directories
  • o —— others: other users

Note:
It is known and can be used g 来标识所属组用户. 所属组What does that mean?


A simple example: When you were in school, let’s say you were in Class 1, Grade 2! There are 20 students in the class, and you are one of them (u). Besides you, there are 19 students in the class who are in the same class as you. Their identities are: g (group to which they belong) [here The group is: Grade 1, Class 2!


In the same way, for the 20 students in Class 2 of Grade 1, they are a collective. To exaggerate, except for 20 of them, everyone else in the world is relatively speaking: other users (o).

2.Details of the files viewed by the ll command

Note: Related articles have been introduced before! Click to view! This article mainly provides additional information: the position of three groups of three in the file details! Linux:: [Basic Commands:: (Supplementary): (5)]:: Preliminary understanding and analysis of file details: file types and user access permissions, file type classification instructions [Article Directory ]

Insert image description here


As shown below, in the previous article, the general composition of the file details has been introduced!

  • 前十位:(一位)文件类型 + (九位)三类用户操作文件的权限
  • Three types of users : those introduced in this article:ugo

Insert image description here


Conclusion (note)

This article is only the beginning of the chapter on permissions under Linux. The content is small and very simple. The next issue will:详解 Linux 下文件权限的认识说明!包含文件权限的字符表示方式及八进制表示方式!随后将引入 chmod 指令!

Guess you like

Origin blog.csdn.net/weixin_53202576/article/details/131195933