A Linux user wants to give read-only permissions to a directory and its contents. Which of the following commands will allow the user to accomplish this task?
This question is absolutely stupid, because if you type chmod -R 400 /new_directory/ then it will remove execute permission making this directory and its content inaccessible
Correct Answer: A. chmod ג€"R 400 /new_directory/
The key is a "directory and its contents"
chmod Modifies File Permissions
-R Change files and directories recursively.
Read only would be 400
A is the answer.
Read = 4, Write = 2, Execute = 1
Therefore the directory would need to be 400 and need to be recursive with the -R option.
Reference: https://linuxize.com/post/chmod-command-in-linux/
I think it should be C
https://ldapwiki.com/wiki/Examples%20Using%20chmod#:~:text=chmod%20400%20myfile%20%2D%20Gives%20the,the%20third%20is%20for%20other.
You need the -R option to apply it to the directory contents. Thus, is A.
upvoted 2 times
...
...
This section is not available anymore. Please use the main Exam Page.XK0-004 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Vegito24
Highly Voted 4 years, 4 months agoalfre
Highly Voted 4 years, 4 months agoluken7777
Most Recent 1 year, 9 months agoRichardJRL
3 years agoDan_Dan_The_Data_Center_Man
3 years, 5 months agoTy_G_S
3 years, 9 months agojahute27
4 years, 4 months agojahute27
4 years, 4 months agoMas511
3 years, 6 months ago