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)- A10% (3)
- B80% (24)
- C3% (1)
- D7% (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.