nerdexam
LPI

010-150 · Question #6

Which of the following commands can be used to change both the owner AND group settings of a file?

The correct answer is D. chown. The chown command is the only standard Linux utility that can change both the owner and the group of a file in a single invocation.

Legal, Professional, and Ethical Responsibilities

Question

Which of the following commands can be used to change both the owner AND group settings of a file?

Options

  • Achmod
  • Bchage
  • Cchuser
  • Dchown
  • Echgrp

How the community answered

(23 responses)
  • A
    9% (2)
  • C
    4% (1)
  • D
    74% (17)
  • E
    13% (3)

Why each option

The chown command is the only standard Linux utility that can change both the owner and the group of a file in a single invocation.

Achmod

chmod modifies the permission bits (read, write, execute) of a file but has no ability to alter ownership or group assignment.

Bchage

chage modifies user account password aging policies such as expiry dates and warning periods - it operates on user accounts, not file metadata.

Cchuser

chuser is not a standard Linux command and does not exist in common Linux distributions.

DchownCorrect

chown accepts the syntax 'chown owner:group filename', where specifying a colon-separated pair updates both the owning user and the owning group atomically in one command, which no other listed tool can do.

Echgrp

chgrp changes only the group ownership of a file and cannot change the owning user, making it insufficient when both must be updated.

Concept tested: Changing file owner and group with chown

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

Topics

#chown#file ownership#group settings#Linux permissions

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice