nerdexam
CompTIA

SK0-005 · Question #585

A technician has been unable to access a file and has issued the following commands to troubleshoot: Which of the following would allow the user to read the file without changing it?

The correct answer is D. Adding user readUser to readSome group. To grant read access to a file for 'readUser' without altering the file, the user should be added to the 'readSome' group, assuming that group has read permissions.

Server administration

Question

A technician has been unable to access a file and has issued the following commands to troubleshoot:

Which of the following would allow the user to read the file without changing it?

Options

  • AAdding user root to readSome group
  • BChanging file group to readFile
  • CChanging file owner to readUser
  • DAdding user readUser to readSome group

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    15% (4)
  • D
    73% (19)

Why each option

To grant read access to a file for 'readUser' without altering the file, the user should be added to the 'readSome' group, assuming that group has read permissions.

AAdding user root to readSome group

Adding user 'root' to the 'readSome' group is irrelevant as 'root' already has full access to all files and would not grant access to 'readUser'.

BChanging file group to readFile

Changing the file group to 'readFile' would alter file metadata and require 'readFile' to have appropriate permissions, which is less direct than leveraging existing group permissions.

CChanging file owner to readUser

Changing the file owner to 'readUser' would grant 'readUser' full control (read, write, execute) based on owner permissions, which violates the requirement to allow reading 'without changing it' if write access is also granted.

DAdding user readUser to readSome groupCorrect

If the file's group is 'readSome' and that group has read permissions, adding the user 'readUser' to the 'readSome' group will grant 'readUser' the necessary read access. This approach leverages existing permissions without altering file ownership or group settings, which could have broader impacts.

Concept tested: Linux file permissions and group membership

Source: https://man7.org/linux/man-pages/man1/id.1.html

Topics

#File permissions#User management#Group management#Access control

Community Discussion

No community discussion yet for this question.

Full SK0-005 Practice