nerdexam
CompTIA

XK0-006 · Question #72

A systems administrator changed the file permissions on the myfile file: $ sudo chmod g+w myfile $ ls -l myfile -rwxrwxr-x 1 admin editors C 2022-10-13 10:45 myfile Then the administrator added an…

The correct answer is A. The user test needs to log out and log back in before editing the myfile file. Group membership is only applied at login time. Having added “test” to the editors group, they must log out and log back in before the new group permissions take effect.

Services and User Management

Question

A systems administrator changed the file permissions on the myfile file:

$ sudo chmod g+w myfile $ ls -l myfile -rwxrwxr-x 1 admin editors C 2022-10-13 10:45 myfile Then the administrator added an existing user test to the editors group:

$ sudo usermod -aG editors test However, the user test is still unable to edit the file. Which of the following solutions will fix this issue?

Options

  • AThe user test needs to log out and log back in before editing the myfile file.
  • BThe file is only writable by the root user, and the user test needs root permissions.
  • CThe group for the user test needs to be reloaded by running sudo source /etc/group.
  • DIn order to edit the file, additional permissions are required that the user test does not have.

How the community answered

(40 responses)
  • A
    73% (29)
  • B
    8% (3)
  • C
    15% (6)
  • D
    5% (2)

Explanation

Group membership is only applied at login time. Having added “test” to the editors group, they must log out and log back in before the new group permissions take effect.

Topics

#group membership#usermod#file permissions#session refresh

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice