Lab 2
Chapter 4
🐧 Linux

Linux File Permissions and User Management

Configure Linux users, groups, and file permissions using chmod, chown, and ACLs.

0 / 6 tasks completed

📋 Tasks

1 Create a new user called labuser2
sudo useradd -m labuser2
2 Create a confidential file
echo 'SECRET DATA' | sudo tee /home/student/confidential.txt
3 Set permissions so only the owner can read it
sudo chmod 600 /home/student/confidential.txt
4 Verify the permissions
ls -la /home/student/confidential.txt
5 Try accessing as labuser2 (should fail)
sudo -u labuser2 cat /home/student/confidential.txt
6 Grant labuser2 limited sudo for viewing logs only
sudo visudo

💻 Interactive Terminal

bash — cyber-lab
Welcome to Lab 2: Linux File Permissions and User Management
Type commands below to complete each task. Type 'help' for available commands.
──────────────────────────────────────────────
student@cyber-lab:~$
💡 Complete task 1: Create a new user called labuser2

🤔 Reflection

What is the difference between chmod 644, 600, and 755? When would you use each?

← Lab 1 Lab 3 →