Changing File Ownership
Concept & Overview
Imagine buying a house and having to officially register the deed under a new owner's name. In Linux, every file and folder has an official owner and a group. If you need to hand a file's ownership over to someone else (like the system administrator), you use the chown (change owner) command.
- Because changing who owns a file is a sensitive security action, you must prefix it with sudo to run it with administrative privileges. E.g., sudo chown root reports.csv assigns the file to the user "root".
/home/learner/reports.csv to the administrator root by running sudo chown root reports.csv.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
sudo chown root reports.csv | Change owner of reports.csv to root |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run the "chown" command with sudo
- ○Set owner of reports.csv to root
Ready to complete Quest 33?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.