CompTIA Linux+ (XK0-004) — Question 91
A company wants to ensure that all newly created files can be modified only by their owners and that all new directory content can be changed only by the creator of the directory. Which of the following commands will help achieve this task?
Answer options
- A. umask 0022
- B. umask 0012
- C. chmod ג€"R 0644 /
- D. chmod ג€"R 0755 /
Correct answer: A
Explanation
The correct command is 'umask 0022', which sets the default file permissions to allow only the owner to write to new files, while others have read access. The other options either set permissions that allow group write access or change file permissions retroactively rather than setting the default for newly created files.