In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the example analysis of Linux file attributes and permissions, the editor thinks it is very practical, so share it for you to do a reference, I hope you can get something after reading this article.
The file in the Linux file system is a collection of data. The file system contains not only the data in the file, but also the structure of the file system. All the files, directories, soft connections and file protection information seen by Linux users and programs are stored in it.
In Linux, any file has three identities of "User,Group,Others" (user, user group, and others).
One of the most useful features of user groups is that when you develop resources on a team, each account can be supported by multiple user groups.
Linux file properties:
1. After logging in to Linux as root, execute "ls-al" (ls:list, showing the file name and related attributes;-al: listing all the detailed permissions and attributes of the file (including hidden files))
First column: file type and permissions the first letter represents the file type: d directory-file
L link file
B interface devices available for storage in the device file
C represents the serial port device in the device file, such as an one-time reading device such as keyboard and mouse
The first group is the file owner (User) permission, the second group is the permission of the same user group (group), and the third group is the permission of other non-local user group (Others). Second column: how many filenames are connected to this node (i-node)
Each file records its permissions and attributes to the i-node of the file system, but the directory tree we use is recorded using a file name, so each file name is connected to an i-node. This attribute records how many different file names are connected to the same i-node number 3. The third column: owner account number
4. Fourth column: the user group to which the file belongs
5. Fifth column: capacity size, default unit B
6. Column 6: date created or last modified
View full time ls-l-full-time
(garbled code can be modified by using "LANG = en_US".)
(modify the system configuration file "/ etc/sysconfig/i 18n" and use nano to modify the contents of the file so that "LANG = en_US" makes the default language of the system English)
7. Seventh column: file name
Rwx: the location will not change. If there is no permission, there will be a minus sign (-).
R: readable (read)
W: writable (write)
X: executable (execute)
The importance of file permissions
One of the differences between Linux and Windows: in the Linux system, every file adds a lot of attributes, especially the concept of user groups
1. System protection function (data security)
2. The function of team developing software or data sharing
3. it will bring some harm if the permissions are not set properly.
On the "sample analysis of Linux file attributes and permissions" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.