Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Cloud computing training for good programmers: simple instructions for sharing Linux file permissions

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Cloud computing training for good programmers to share Linux file permissions simply states that every file or directory in Linux contains access permissions, which determine who can access these files and directories and how. By setting permissions, you can restrict access from the following three access methods:

Only allow users to access (owner)

Allow users in a pre-specified user group to access (user group)

Allow any user in the system to access (other users).

The owner is the user who created the file, the user is the owner of all the files created by the user, and the user can allow the user group to access the user's file.

Typically, users are grouped into user groups, for example, all users in a certain class or project can be grouped into one user group by the system administrator, and one user can grant file access to other members of the user group.

Finally, users also open their files to all users in the system, in which case all users in the system can access users' directories or files. In this sense, all other users within the system are the other user class. This is a bit similar to Qzone's access rights, this Qzone belongs to me, I am equivalent to the manager (that is, the "owner"), I can access as I want.

At the same time, I can set up to allow QQ friends to access, and these QQ friends are similar to "user groups", of course, I can allow everyone to access, all people here are similar to "other users". At the same time, the user can control the access of a given file or directory, which may have read, write and execute permissions.

Each user has its own read, write, and execute permissions.

The first set of permissions controls access to your own files, that is, owner permissions.

The second set of permissions controls the permissions of the user group to access one of the users' files.

The third set of permissions controls the permissions of all other users to access a user's files.

These three groups of permissions give users different types of read, write, and execute permissions (that is, owners, user groups, and other users) constitute a group of nine types of permissions.

Simple description of Linux file permissions

The first letter represents the type of file: "d" for folder, "-" for normal file, "c" for hardware character device, "b" for hardware block device, and "l" for soft link file.

The last nine letters represent three sets of permissions: the owner of the file, the user, and the permissions of other users.

R (read, read): for files, you have permission to read the contents of files; for directories, you have permission to browse directories.

W (write, write): for files, it has the permission to add and modify file contents; for directories, it has the permission to delete and move files in the directory.

X (execute, execute): for files, you have permission to execute files; for directories, the user has permission to enter directories.

Do not have any permissions.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report