Question 332 of 513
1Z0-829 Java I/O API and Securing Applications Practice Question
A Java application uses SecurityManager with a policy file. Which permission is required to allow the application to read all files in the /var/log directory, including subdirectories?
⚠ Common exam trap
Test-takers frequently confuse the single-level wildcard '*' with the recursive wildcard '-', leading them to choose option D which only grants access to files directly in /var/log, not subdirectories.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
permission java.io.FilePermission "/var/log/-", "read";
The trailing '-' in the path pattern '/var/log/-' is a recursive wildcard that matches all files and subdirectories under /var/log, which is required to read all files in that directory tree. The permission grants 'read' access, which is the only action needed for reading files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
permission java.io.FilePermission "/var/log", "read";
Why it's wrong here
This grants read access only to the directory entry itself, not its contents.
- ✓
permission java.io.FilePermission "/var/log/-", "read";
Why this is correct
"-" grants access to all files and subdirectories recursively.
- ✗
permission java.io.FilePermission "/var/log/*", "read,write";
Why it's wrong here
Granting write permission is unnecessary and less secure.
- ✗
permission java.io.FilePermission "/var/log/*", "read";
Why it's wrong here
"*" only covers files directly in /var/log, not subdirectories.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.