nerdexam
LPI

010-100 · Question #8

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 can change both the owning user and the owning group of a file in a single invocation using the owner:group syntax.

Configuration

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

(54 responses)
  • A
    4% (2)
  • B
    15% (8)
  • C
    2% (1)
  • D
    72% (39)
  • E
    7% (4)

Why each option

The chown command can change both the owning user and the owning group of a file in a single invocation using the owner:group syntax.

Achmod

chmod changes the permission bits (read, write, execute) of a file and has no effect on ownership.

Bchage

chage modifies user password aging and expiration policies and is unrelated to file ownership.

Cchuser

chuser is not a standard Linux/Unix command for changing file ownership.

DchownCorrect

chown accepts the format 'chown owner:group filename', allowing both the user owner and group owner to be changed simultaneously. It can also change only the owner or only the group when used with the appropriate syntax, making it the most versatile ownership command.

Echgrp

chgrp changes only the group ownership of a file and cannot simultaneously change the user owner.

Concept tested: chown command for changing file owner and group

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

Topics

#chown#file ownership#group settings#Linux commands

Community Discussion

No community discussion yet for this question.

Full 010-100 Practice