nerdexam
CompTIA

XK0-005 · Question #83

Two specific users need access to a directory owned by root where backups are located. Which of the following commands would BEST ensure the specified users can access the backup files?

The correct answer is D. setfacl. To grant access to a directory for two specific users while the directory is owned by root, setfacl is the most suitable command as it allows for granular permissions beyond standard user/group/other.

Security

Question

Two specific users need access to a directory owned by root where backups are located. Which of the following commands would BEST ensure the specified users can access the backup files?

Options

  • Aumask
  • Bchcon
  • Cchmod
  • Dsetfacl

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    10% (3)
  • C
    3% (1)
  • D
    83% (24)

Why each option

To grant access to a directory for two specific users while the directory is owned by root, `setfacl` is the most suitable command as it allows for granular permissions beyond standard user/group/other.

Aumask

`umask` sets default permissions for newly created files and directories; it does not modify permissions on existing files or grant access to specific users.

Bchcon

`chcon` changes the SELinux security context of files, which is a different security mechanism and does not directly grant standard file system access to users.

Cchmod

`chmod` changes standard file permissions (owner, group, other) and is not ideal for granting access to *two specific users* without affecting other users or creating a new group.

DsetfaclCorrect

`setfacl` (set File Access Control Lists) allows an administrator to define more granular permissions for files and directories than traditional Unix permissions. It enables specific users or groups, beyond the file's owner and primary group, to be granted read, write, or execute access without altering the file's ownership or standard group permissions.

Concept tested: Linux File Access Control Lists (ACLs)

Source: https://man7.org/linux/manpages/man1/setfacl.1.html

Topics

#File Permissions#Access Control Lists (ACLs)#User Access Control#Linux Commands

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice