nerdexam
CompTIACompTIA

XK0-005 · Question #247

XK0-005 Question #247: Real Exam Question with Answer & Explanation

The correct answer is B: chmod 770 /Sales. To enable users in the 'sales' group to create files within the /Sales directory, the directory's group permissions must be updated to include write access.

Troubleshooting

Question

Users in the sales department are unable to create new files in the shared directory /Sales. A junior Linux administrator determines the permissions on the /Sales directory are set to rwxr-----, and sales is the group owner of the directory. Which of the following is the BEST command for the junior administrator to issue to allow the users to create new files?

Options

  • Aumask 002
  • Bchmod 770 /Sales
  • Cchmod g+s /Sales
  • Dchmod 777 /Sales

Explanation

To enable users in the 'sales' group to create files within the /Sales directory, the directory's group permissions must be updated to include write access.

Common mistakes.

  • A. umask 002 sets the default permissions for newly created files and directories for a user, but it does not modify the permissions of an existing directory.
  • C. chmod g+s /Sales sets the Set Group ID (SGID) bit, causing new files to inherit the directory's group, but it does not grant write permission to the group on the directory itself.
  • D. chmod 777 /Sales would grant read, write, and execute permissions to all users, which is an unnecessary security risk as only the 'sales' group requires write access.

Concept tested. Linux directory permissions and chmod

Reference. https://manpages.debian.org/stable/coreutils/chmod.1.en.html

Topics

#Linux Permissions#chmod#File System Management#Group Permissions

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions