We create a folder under root and create a file under that folder, so what does the other user have to do with the file's permissions? Let's explore the impact of the parent directory's permissions on the child file.
First, create the test folder with root in the root directory, then create the file file under the Test folder, and the default test folder has permissions of 644 for the 755,file file. Let's make a formal test below.
Test 1, set the permissions for the test folder to 750, which means that other users do not have read and write permissions. At this point, a non-root user is used to lover the user, execute the command to view the file (at this point, the other user of file has Read permission, after the/TEST/FI, the TAB key can not be automatically completed), the results are as follows:
Test 2, set the permissions for the test folder to 754, which means that other users have only Read permissions. At this point, a non-root user lover is used to execute the command to view the file (at which time the other user of file has Read permission, the TAB key is used after the/TEST/FI is spelled, and the automatic completion is completed), and the results are as follows:
Test 3, set the permissions for the test folder to 751, which means that other users have only execute permissions. At this point, a non-root user lover is used to execute the command to view the file (at which time the other user of file has Read permission, the TAB key is not automatically completed after the/TEST/FI is spelled), and the results are as follows:
Summary: When you use a file with a non-root user to view the Read permission, other users of its parent directory must have executable permissions, otherwise the prompt permissions are insufficient.