- Lab
- A Cloud Guru
Working with Linux File Access Control Lists (FACLs)
In this lab, we'll review what file access lists (FACLs) are used for. We'll set up a FACL to restrict access to a single file. We'll implement one rule to permit access for a single user, and then we'll edit permissions to remove access for all other users.
Path Info
Table of Contents
-
Challenge
Create user account `pjohnson` and the project directory and file.
- Create the user account
pjohnson
with the following command:sudo useradd pjohnson
- Create the project directory with the following command:
sudo mkdir /project51
- Create the
TPSreport.txt
file in the/project51
directory with the following command:sudo touch /project51/TPSreport.txt
- Create the user account
-
Challenge
Create FACL to permit user `pjohnson` access to file `TPSreprot.txt`.
-
Create a FACL for
/project51/TPSreport.txt
permitting userpjohnson
RWX access:sudo setfacl -m u:pjohnson:rwx /project51/TPSreport.txt
-
-
Challenge
Remove access for other users from the file `/project51/TPSreport.txt`.
-
To remove other users' access, use the following command:
sudo chmod o-rwx /project51/TPSreport.txt
-
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.