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