Some issues of files and folder permissions under Linux

xiaoxiao2021-03-06  41

Today, come to discuss the privilege of Linux files and folders.

Preface: The whole system under Linux is a file system, even if a device Linux is also displayed as a file or folder. If you can set up the Linux system file permission to prevent the invasion. Text: Linux Permissions Under the current directory, use the ls -l command to detect the permission settings of non-hidden files in the current directory. There are ten digits in the permissions field such as: -rwxrwx-w- minus, not this is not this. The first bit is used to represent file properties, if "D" means this is a folder, if "L" means this is a link, if yes "-"

Then it is a normal file. The 2nd to 4th is the permissions indicating that the file owner has, the 5th to 7th is the permissions owned by other users in the working group of the file owner. The last 3 is

Other users have the permissions owned by the file. The above is said, and the topic is entered below.

When a user is executing permission to a script file, the user cannot perform a script file, but can perform other applications. Because when the scriptor is executed

The shell needs to read the contents of the script file, so you need to read the file. When executing a script, if the user reads and runs two permissions on the file, the shell will start a child process to run this script file, if only read permissions shell will be

Before the shell executes this script file.

When a user is only written to a normal file, the file content cannot be viewed by Cat FileName or More FileName, but can be used to redirect it.

Add new content, or override the original content. The last thing to say is that no matter what you set the file, LS -L will list the permissions of the files in the current directory.

File clips are allowed to have execution permissions when you want to access a folder, if you don't enter this folder, even if you have written permissions to this folder, you can't in this folder.

Establish any files and folders. If you have only read-only permissions to a folder, then you can only read it outside this folder and cannot enter its interior. To write new files and new folders in the folder, you must have both execution and write these two permissions at the same time, and if you don't have a new directory.

The directory is a special file that contains the file name and its associated inode number. Inode contains all information of the file, including the permissions of the file, owner, creation date, link,

Save the address of the data block of the file content on the hard disk, to access the file, first get its inode number through the directory, then check the address of Inode and the address of the data block, finally can access

. This is also a summary of the entry folder permissions mentioned above.

转载请注明原文地址:https://www.9cbs.com/read-61577.html

New Post(0)