CompTIA Linux+ (XK0-004) — Question 181

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?

Answer options

Correct answer: B

Explanation

The correct answer is B because using 'chmod 770 /Sales' grants read, write, and execute permissions to both the owner and the group, allowing users in the sales group to create new files. Option A, 'umask 002', affects new files created in the future but does not change existing directory permissions. Option C, 'chmod g+s /Sales', sets the setgid bit, which ensures new files inherit the group but does not grant the necessary write permissions. Option D, 'chmod 777 /Sales', gives all users full permissions, which is not advisable for a shared directory.