Linux-File permissions

Source: Internet
Author: User
Tags readable

LS is the "list" meaning, focusing on displaying the file name and related attributes. The option "-al" means to list all the file's detailed permissions and attributes (including hidden files, that is, the first character of the filename is ". "file).


The first column represents the type and permissions of this file (permission):


The first character indicates that the file is "directory, file, or linked file, etc.":

When [d] is the directory, for example, the row with the table file named ". GConf";
When [-] is the file, for example, the previous table is named "Install.log" the line;
If [l] is indicated as a link file (link file);
If [b] is indicated as the device file inside the storage interface device (can be random access device);
If [C] is indicated as a serial port device inside the appliance file, such as a keyboard, mouse (one-time reading device).

In the following characters, a group of three, each of which is a combination of three parameters, is "rwx". where [R] stands for readable (read), [W] stands for writable (write), [x] stands for executable (execute). Note that the location of the three permissions does not change, and if there is no permission, a minus sign [-] is present.

The first group is "permission of the file owner";
The second group is "permission of the same group";
The third group is "permissions for other non-native groups".

The second column indicates how many file names are linked to this node (I-node):
Each file will log his permissions and attributes to the file system's I-node, but the directory tree we use is recorded using a file name, so each filename is linked to a i-node! This property records how many different file names are linked to the same i-node number.

The third column represents the "owner account" of this file (or directory)
Column four indicates the group to which this file belongs
Under the Linux system, your account will be attached to one or more groups. As we have just mentioned, Class1, Class2, Class3 belong to the PROJECTA group, assuming that a file belongs to a group projecta, and that the file's Permissions 2.1.2 (-rwxrwx---), then Class1, Class2, CLASS3 three people have readable, writable, and executable permissions for the file (see Group permissions). However, if the other account is not part of projecta, there is no permission for this file.

Column five for the size of the file, the default unit is bytes;
Column Six is the date the file was created or the most recent modification date:
The contents of this column are date (month/day) and time respectively. If the file has been modified for too long now, the time section will only show the year.

The seventh column is the file name
This field is the file name. More Special: If the file name is preceded by one more. ", the file is a" hidden document ", such as the. GConf line in the previous table, the file is a hidden document.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux-File 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.