Just wondering why a directory would need this.
Or, is it possible to get files from the directory without having to read them directly?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
The executable permission on directories allows you to traverse the directory without being able to read its contents. This effectively allows you to place a directory you do want others to have access to, beneath a directory you do not want them to have access to.
A common use you'll see for this is having a website document root inside a home directory. You do not necessarily want to allow access to the home directory contents (not even viewing the files) but need to allow the webserver user access to the 'public_html' directory inside the home directory.
Yes, having just
+x still allows you to access the directory's contents if you know filenames. You only need
+r to list (i.e. read) the directory itself.