3

Just wondering why a directory would need this.

Or, is it possible to get files from the directory without having to read them directly?

6

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.

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.