If you wish to list the contents of a directory, what permissions must you have for that directory?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

If you wish to list the contents of a directory, what permissions must you have for that directory?

Explanation:
Listing a directory’s contents requires both read and execute permissions on that directory. The read bit allows you to read the entries inside (see the names), while the execute bit (often called traverse) lets you access and traverse into the directory to actually retrieve information about those entries. Without execute, you can’t access the inside even if you can read names; without read, you can’t see the names at all. Write permission isn’t needed just to list contents, since it controls modifying the directory’s entries. Therefore, you need both read and execute.

Listing a directory’s contents requires both read and execute permissions on that directory. The read bit allows you to read the entries inside (see the names), while the execute bit (often called traverse) lets you access and traverse into the directory to actually retrieve information about those entries. Without execute, you can’t access the inside even if you can read names; without read, you can’t see the names at all. Write permission isn’t needed just to list contents, since it controls modifying the directory’s entries. Therefore, you need both read and execute.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy