nerdexam
GIAC

GSSP-JAVA · Question #52

Which of the following are valid code samples for creating file permissions? Each correct answer represents a complete solution. Choose all that apply.

The correct answer is A. FilePermission per = new FilePermission("-", "read, execute"); B. FilePermission per = new FilePermission("<<ALL FILES>>", "read"); C. FilePermission per = new FilePermission("file1", "read, write"); D. FilePermission per = new FilePermission("/bin/*", "execute"); E. FilePermission per = new FilePermission("/tmp/myfile", "read, delete"). See the full explanation below for the reasoning.

Question

Which of the following are valid code samples for creating file permissions? Each correct answer represents a complete solution. Choose all that apply.

Options

  • AFilePermission per = new FilePermission("-", "read, execute");
  • BFilePermission per = new FilePermission("<<ALL FILES>>", "read");
  • CFilePermission per = new FilePermission("file1", "read, write");
  • DFilePermission per = new FilePermission("/bin/*", "execute");
  • EFilePermission per = new FilePermission("/tmp/myfile", "read, delete");
  • FFilePermission per = new FilePermission("/*", "read");

How the community answered

(19 responses)
  • A
    74% (14)
  • F
    26% (5)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice