(012) Linux Permissions

Source: Internet
Author: User

Fundamentals of the ten-year OPS series-Linux

Zeng Lin

Contact: [Email protected]

Website: www.jplatformx.com

Copyright: Please do not reprint the article without permission

First, Introduction

In the Linux security model, a user can own (own) files and directories. When a user owns a file or directory, it has control over the access to the file or directory. In turn, the user belongs to a group that consists of one or more users, and the user's access to the files and directories is granted by the owner of the group. In addition to granting group access, file owners can grant access to all users, and in Linux terminology, all users refer to the entire world. Use the ID command to obtain information about the user's identity.

View the output of the ID command. When creating a user account, the user is assigned a number called the User ID (userid) or UID. In order to conform to people's usage habits, the user ID and user login name one by one are mapped. At the same time the user will be assigned a valid group ID (primary group ID) or GID, and the user can also be attributed to other groups.

So where does this information come from? Similar to many situations in Linux systems, this information is derived from a series of text files. The user account is defined in the file/etc/passwd, and the user group is defined in the file/etc/group. When creating user accounts and groups, these files are modified as the file/etc/shadow changes, and the file/etc/passwd defines the user's login name, UID, GID, real name of the account, home directory, and login shell information. If you look at the contents of the file/etc/passwd and the file/etc/group, you will notice that in addition to the general user account information, there are account information in the file that corresponds to the superuser (UID 0) and other different kinds of system users.

Many Linux-like systems assign ordinary users to a common group (for example, users), and now Linux operations create a unique, one-user group with the same name as the user. This makes it easier to assign specific types of permissions.

(012) Linux Permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.