- Lab
- A Cloud Guru
Managing File Ownership and Permissions
In this hands-on lab, we will practice managing Linux file and directory ownership and permissions. Having a solid understanding of ownership and permissions is a fundamental skill for Linux systems administration.
Path Info
Table of Contents
-
Challenge
Lock Bill's, Susan's, and Juan’s Accounts
- Run the following command:
for i in bill susan juan; do sudo passwd -l $i; done
-
Challenge
Create Accounts for Nancy, Greg, and Jeremy
- Run the following commands:
sudo useradd -m nancy
sudo useradd -m greg
sudo useradd -m jeremy
-
Challenge
Remove Bill as a User and Transfer Ownership of his Home Directory
- Remove the user
bill
.
sudo userdel bill
- Change the ownership of Bill's home directory (recursively) to the user
nancy
and the groupjason
.
sudo chown -R nancy:jason /home/bill
- Change the mode of the directory to grant read and execute permissions to the group.
sudo chmod g+rx /home/bill
- Remove the user
-
Challenge
Remove Susan as a User and Transfer Ownership of her Home Directory
- Remove the user
susan
.
sudo userdel susan
- Change the ownership of Susan's home directory (recursively) to the user
greg
and the groupjason
.
sudo chown -R greg:jason /home/susan
- Change the mode of the directory to grant read and execute permissions to the group.
sudo chmod g+rx /home/susan
- Remove the user
-
Challenge
Remove Juan as a User and Transfer Ownership of His Home Directory
- Remove the user
juan
.
sudo userdel juan
- Change the ownership of Juan's home directory (recursively) to the user
jeremy
and the groupsally
.
sudo chown -R jeremy:sally /home/juan
- Change the mode of the directory to grant read and execute permissions to the group.
sudo chmod g+rx /home/juan
- Remove the user
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.