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

Key summary of Linux file permissions and directory configuration

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces "Linux file permissions and directory configuration key summary", in daily operation, I believe many people in Linux file permissions and directory configuration key summary problems have doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, I hope to answer "Linux file permissions and directory configuration key summary" doubts helpful! Next, please follow the small series to learn together!

are summarized, a

In each file in Linux, users, groups, and others can be given individual rwx permissions.

One of the most useful features of groups is when you are developing resources on a team, and each account can have multiple group support;

Among the file attributes displayed by ls -l, the first field is the permission of the file, with a total of ten bits. The first bit is the file type. The next three are a group of three groups, which are the permissions of the user, group and others. The permissions are r,w and x.

If there is one more " . ", it means that this file is a" hidden file ";

If root privileges are required, the su -command can be used to switch identities. After processing, use exit to leave su's instruction environment.

chgrp is available to change the group support of a file, chown is available to modify the owner of a file, chmod is available to modify the permissions of a file

chmod There are two ways to modify permissions, namely symbolic method and numerical method. In numerical method, r,w,x scores are 4,2,1;

For files, the properties of permissions are:

r: You can read the actual content of this file, such as reading the text content of a text file;

w: You can edit, add or modify the content of the file (but not delete the file);

x: The file has permissions that can be executed by the system.

For directories, the properties of permissions are:

r (read contents in directory)

w (modify contents of directory)

x (access directory)

To open the directory for anyone to browse, you should at least give r and x permissions, but w permissions cannot be given casually;

Whether you can read the contents of a file is also related to the permissions of the directory where the file is located (the directory must have at least x permissions).

Linux file name restrictions are: the maximum allowable file name of a single file or directory is 255 English characters or 128 Chinese characters;

According to FHS official documents, their main purpose is to make it possible for users to know that installed software is usually

Put it in that directory.

FHS has four categories: shareable, unshareable, static, variable, etc.

FHS defines the three-tier home directory as: /, /var, /usr three-tier;

Absolute path filenames are filenames that start with the root directory/, otherwise they are relative paths.

At this point, on the "Linux file permissions and directory configuration focus summary" of the study is over, I hope to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

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

Internet Technology

Wechat

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

12
Report