🌐 Linux Free Masterclass (Episode 13): Ownership Management (chown and chgrp)
How do you transfer file ownership or reassign group accountability when project responsibilities shift between users and teams? Through ownership management commands.
Here are the key points from Episode 13:
🔹 1. The chown Command (Changing File Ownership)
Purpose: Modifies the user owner of a file or directory.
Usage: Typing sudo chown rahul report.txt assigns the user rahul as the sole owner of the file.
🔹 2. Changing Both Owner and Group Simultaneously (chown user:group)
Advanced Shortcut: You can update both the user owner and the group in a single command using a colon (:).
Usage: Typing sudo chown rahul:developers report.txt updates the owner to rahul and the group to developers instantly.
🔹 3. The chgrp Command (Changing File Group)
Purpose: Specifically targets and modifies only the group associated with a file or directory.
Usage: Typing sudo chgrp admins report.txt reassigns the file's group ownership to admins.
🚀 Think of ownership commands like transferring an official project dossier in a corporate office: when a new department lead takes charge, the file's paperwork is officially updated to reflect the new owner and team division!




