The first rule is that whenever we want to open any type of file by name, we must have execute permission in each directory mentioned in the name, including the current directory, if it is implied. this is why the Execute Permission bit for a directory is often called the search bit.
For example, to open the file/Usr/include/stdio. h, We need execute permission in the directory/, Execute permission in the directory/Usr, And execute permission in the directory/Usr/include. We then need appropriate permission for the file itself, depending on how we're re trying to open it: Read-only, readwrite, and so on.
If the current directory is/Usr/include, Then we need execute permission in the current directory to open the fileStdio. h. This is an example of the current directory being implied, not specifically mentioned. It is identical to our opening the file./Stdio. h.
Note that read permission for a directory and execute permission for a directory mean different things. read Permission lets us read the directory, obtaining a list of all the filenames in the directory. execute Permission lets us pass through the directory when it is a component of a pathname that we are trying to access. (We need to search the directory to look for a specific filename .)
Another example of an implicit directory reference is ifPathEnvironment variable, described in section 8.10, specifies a directory that does not have execute permission enabled. In this case, the shell will never find executable files in that directory.