6.Linux file permissions and directory configuration

Source: Internet
Author: User

    1. Linux file properties: (-rwx r-x r--1 root root 2800 Feb 1 11:55 test.txt ORDER by space, except time)
        1. The first set of characters indicates that the file is a directory, a file, or a linked file.
        2. The second set of characters represents the permissions that the owner has on this file
        3. The third set of characters represents the permissions that the owning group has on this file
        4. The fourth set of characters represents the permissions that other people have on this file
        5. The fifth number represents the number of inode connections
        6. Groups sixth and seventh, respectively, owned by the file and the group to which they belong
        7. Group eighth is the size of the file, the default unit is B
        8. Group Nineth is the creation time or modification time
        9. The tenth group is the file name
    2. Permission meanings for directories and files:
        1. The meaning of permissions for a file:
          1. Files are places where actual data is stored, such as database content files, text files, and so on.
          2. R (Read): Can read the actual contents of the file
          3. W (write): Files can be added, deleted, modified content, and so on, does not mean that the file can be renamed and deleted operations.
          4. X (Execute): The file has permission to be executed by the system
          5. The rwx for a file is only for the contents of the file.
        2. The meaning of permissions for a directory:
          1. The main content of the directory is the list of record file names, and the file name is strongly related to the directory.
          2. R (Read contents in directory): Indicates that you can query the file name data under the directory, and if you do not have X permission, you can only see the filename.
          3. W (Modify contents of directory): Indicates that you have permission to change the list of this directory structure, create new, delete, rename, move, and so on file permissions
          4. X (Access directory): The X of the directory represents the user's ability to enter this directory as a working directory
    3. Linux File types:
        1. Normal file (regular files) (-):
          1. Plain text file (ASCII): A file that can be read directly to the data.
          2. Binary (binary): No difference from ASCII, but in a different way.
          3. Data format file: Some programs need to be read into when they are executed.
        2. Catalog file (directory) (d): The first attribute is [d]
        3. Connection file (link) (L): shortcut file.
        4. Device and Device files:
          1. Block device file (b): Some storage data to provide system random access to the interface device, hard disk, etc.
          2. Character (character) device file (c): An interface file for a serial port, such as a keyboard and mouse, characterized as a one-time read.
        5. Sockets (Sockets) (s): Data interface files, not very well understood.
        6. Pipeline (Fifo,pipe) (p): primarily used to handle conflicts that will result when multiple programs concurrently access a file.

6.Linux file permissions and directory configuration

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.