The influence of the Linux parent directory on child file Read Permissions __linux

Source: Internet
Author: User
Tags parent directory


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.


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.