nerdexam
LPI

010-160 · Question #12

What is true about the owner of a file?

The correct answer is A. Each file is owned by exactly one user and one group. In the Linux filesystem model, every file's inode stores exactly one owning UID and one owning GID, meaning each file always has precisely one owner user and one owner group.

Security and File Permissions

Question

What is true about the owner of a file?

Options

  • AEach file is owned by exactly one user and one group.
  • BThe owner of a file always has full permissions when accessing the file.
  • CThe user owning a file must be a member of the file's group.
  • DWhen a user is deleted, all files owned by the user disappear.
  • EThe owner of a file cannot be changed once it is assigned to an owner.

How the community answered

(52 responses)
  • A
    87% (45)
  • B
    2% (1)
  • C
    4% (2)
  • D
    8% (4)

Why each option

In the Linux filesystem model, every file's inode stores exactly one owning UID and one owning GID, meaning each file always has precisely one owner user and one owner group.

AEach file is owned by exactly one user and one group.Correct

The Linux VFS and underlying filesystems such as ext4 record a single UID and a single GID inside each file's inode. This is an immutable structural property of the permission model - a file cannot have multiple owning users or multiple owning groups simultaneously, and it cannot exist without both an owning user and an owning group.

BThe owner of a file always has full permissions when accessing the file.

Ownership and permission bits are independent metadata; a file owner's read, write, or execute bits can be removed with chmod, allowing a situation where the owner is denied access to their own file.

CThe user owning a file must be a member of the file's group.

The owning user of a file is not required to be a member of the file's owning group; group membership and file group ownership are managed separately and can be completely unrelated.

DWhen a user is deleted, all files owned by the user disappear.

Deleting a user removes their entry from /etc/passwd but leaves all their files intact on disk; those files will display the raw numeric UID rather than a username until ownership is reassigned.

EThe owner of a file cannot be changed once it is assigned to an owner.

The `chown` command allows root - and on some systems the current file owner - to transfer file ownership to a different user at any time after the file is created.

Concept tested: Linux file ownership model - single user and group per file

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

Topics

#file ownership#user and group#file metadata

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice