The directory /srv/keys is drwx--x--x and owned by root. It contains deploy.pem with mode 644. User carol has been told the full path of that file. What can carol do?

LPIC-1 Exam 101-500, objective 104. Devices, Linux filesystems, filesystem hierarchy standard hard

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct She can open /srv/keys/deploy.pem and read it, but `ls /srv/keys` is refused.

Correct. Execute on a directory grants the right to traverse it and resolve a name inside it; read is what grants the right to list the names, and it is absent.

Not correct She can list the directory but cannot open any file inside it.

Wrong, and it is the mirror image of the truth. That is what r-- would give: names visible, but nothing beyond them reachable.

Not correct Both listing and opening fail, because the execute bit is meaningless on a directory.

Wrong. Execute is very meaningful on a directory: without it, no path through that directory can be resolved at all.

Not correct Both listing and opening succeed, because execute permission on a directory implies read permission.

Wrong. The two bits are independent, and this mode deliberately grants one without the other.

Why

The permission bits mean different things on a directory: read allows the list of names to be retrieved, write allows names to be added, renamed or removed, and execute (the search bit) allows the directory to be used as a component of a path. Mode 711 on a directory is therefore a standard trick — its contents can be reached by anyone who already knows a name, but cannot be enumerated — and it is why a per-user home directory is sometimes given mode 711. Every directory along a path needs execute permission before the final file's own mode is even consulted.

Where this comes from

Cited
manual page path_resolution(7)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 104 and space the ones you get wrong.

Practise LPIC-1 Exam 101-500

More questions on this objective

All questions on Devices, Linux filesystems, filesystem hierarchy standard

Practise LPIC-1 Exam 101-500