Working with File and Directory Permissions on RHEL 8

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

One aspect of a properly configured Linux system is correct file permissions. When permissions are too restrictive things don’t work as they should, but if they are too permissive system security suffers. Understanding how to manage file permissions is an important skill for a system administrator. In this hands-on lab, we will diagnose and correct file permission problems. In addition, we will create and configure set-GID directories for collaboration.

*This course is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create and Configure set-GID Directories for Collaboration
  1. Create a shared directory for 3 users to share files properly.
  2. Setup the users and sign in as each to create a file in the shared directory.
  3. Fix the permissions so that all users can access each others files properly.
  4. Create more files to verify things work.
Diagnose and Correct File Permission Problems
  1. Create another user with the system defaults and have them attempt to join the shared directory.
  2. Troubleshoot the issues that come up.
  3. Modify the user account to allow participation in the group.
  4. Change file permissions to allow group editing of each other’s files.
  5. Ensure that no user can delete files they do not own.

Additional Resources

In this lab you'll be a sysadmin who is setting up a shared directory on a server for collaboration between a set of users. You'll create the directory, setup the user accounts and group memberships, then create a test file from each user and inspect the results. You'll then modify the directory to force group ownership inheritance and then do a second set of test files and inspect what happened after the directory permission changes.

In the second task, you'll be creating another user with the system defaults and have that account try to join the collaboration directory, and then fix a series of permission and ownership issues to make her joining the group work properly. You'll then use a final special permission to ensure that while users can edit each other's files, no user can delete any file in the directory they don't own as the user owner.

Red Hat Exam Requirements Covered:

  • Create and configure set-GID directories for collaboration
  • Diagnose and correct file permission problems

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?