Note the x mark! If the file name is a directory, for example, the. ssh directory:
Drwx ------ 2 root 4096 Feb 10 00:44. ssh
It can be seen that this is a directory, and only root can read, write, and execute. But if it is the style below, can anyone other than root enter this directory?
Drwxr -- r -- 2 root 4096 Feb 10 00:44. ssh
Success! It seems OK! Because there is a readable [r! "Error !』 The answer is that non-root users cannot access the. ssh directory. Why? Because the relationship between x and the directory is very important. If you cannot execute any commands under the directory, you will naturally not be able to execute commands such as ls and cd, therefore, please note that if you want to open a directory for some people to come in, please remember to open the x attribute of this directory to others!
In addition, You must be more careful that the ability to execute a file at the bottom of Windows is implemented by "file name attachment", for example :. exe ,. bat ,. com and so on, but in Linux, whether the file can be executed is determined by whether the file has the x attribute! Therefore, there is no absolute relationship with the file name! Please pay special attention to this!