Lab 09: chown and chgrp — Ownership
Objective
Step 1: Setup — Create Users and Groups
useradd -m alice
useradd -m bob
groupadd devteam
echo "Users and group created"
id aliceUsers and group created
uid=1000(alice) gid=1000(alice) groups=1000(alice)Step 2: Viewing Current Ownership
touch /tmp/myfile.txt
ls -la /tmp/myfile.txtStep 3: Changing Owner with chown
Step 4: Changing Only the Group
Step 5: Recursive Ownership Change
Step 6: Why Ownership Matters — Access Control
Step 7: Service Account Pattern
Step 8: Capstone — Fix Misconfigured Service Directory
Summary
Command
Effect
Last updated
