DocMCQs Educational Banner

Which Linux command changes file ownership?

A. chmod
B. chown
C. mkdir
D. rm
Correct Answer: B. chown
Explanation:


The correct answer is chown because it alters the user and/or group assignments of files within Unix-like file systems.



    • Step 1 (Syntax Function): The `chown` utility allows system administrators to adjust permissions by mapping files to specific system accounts using permissions syntax like `chown user:group filename`.

    • Step 2 (Access Control): By changing who owns a file, you change which user accounts have direct control over reading, writing, or executing that file according to system security rules.

    • Incorrect Options:

      • chmod is incorrect because it modifies file access permissions (read, write, execute privileges) rather than changing the actual file owner.

      • mkdir is incorrect because it creates entirely new empty directory folders within the file system structure.

      • rm is incorrect because it deletes files or directories permanently from the system storage environment.




Leave a Comment

Your email address will not be published. Required fields are marked *

Join Our WhatsApp Channel ×
Scroll to Top