nerdexam
CompTIA

XK0-006 · Question #103

Which of the following commands sets all the directories' permissions recursively in the user's home directory and as accessible only to the user?

The correct answer is B. find ~ -type d -exec chmod 700 {} \. This command searches for all directories within the user’s home directory and sets their permissions to allow access only by the owning user, ensuring privacy and proper access control.

Security Best Practices

Question

Which of the following commands sets all the directories' permissions recursively in the user's home directory and as accessible only to the user?

Options

  • Afind / -type f -exec: chmod 777 {} ;
  • Bfind ~ -type d -exec chmod 700 {} ;
  • Cfind /home -type d -exec chmod 750 {} ;
  • Dfind $HOME -type d -exec chmod 755 {} ;

How the community answered

(30 responses)
  • A
    10% (3)
  • B
    80% (24)
  • C
    3% (1)
  • D
    7% (2)

Explanation

This command searches for all directories within the user’s home directory and sets their permissions to allow access only by the owning user, ensuring privacy and proper access control.

Topics

#find command#chmod#recursive permissions#directory permissions

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice