Q: 9
A systems administrator requires that all files that are created by the user named web have read-only
permissions by the owner. Which of the following commands will satisfy this requirement?
Options
Discussion
Option C does it. Setting
umask 377 in the .bashrc means every new file from web will have 400 perms (owner read only), while B is a trap here-chmod would just hit existing files, not future ones. I think C is right, unless there's some edge case with non-interactive shells that I'm missing. Disagree?Pretty sure it's C. Setting umask 377 in the web user's .bashrc will make all new files read-only for the owner and no permissions for group/others. The other options won't achieve that directly. Anyone see a catch?
C That umask will default new files for user web to owner-read-only, so matches the requirement. None of the others really fit here, and B would just set existing files not new ones. I’m like 90% on C but happy to be challenged if someone sees a gap.
For me, C
Be respectful. No spam.