Create Set-Gid Directories for Collaboration

Red Hat Enterprise LinuxBeginner
Practice Now

Introduction

In this challenge, you will create and configure a set-GID directory to facilitate collaboration among users. Set-GID directories ensure that all new files and subdirectories created within them inherit the group ownership of the parent directory. This feature simplifies file sharing and permission management for teams working on shared projects.

Create a Set-GID Directory for Collaboration

In this task, you will create a new directory named collaboration inside the ~/project directory and set the set-GID (Set Group ID) permission bit on it.

Tasks

  • Create a new directory named collaboration inside the ~/project directory.
  • Set the set-GID (Set Group ID) permission bit on the collaboration directory.

Requirements

  • The new directory must be located at ~/project/collaboration.
  • The directory must be named exactly collaboration.
  • The set-GID permission bit must be correctly applied to the ~/project/collaboration directory.

Example

After you have completed the tasks, checking the permissions of the collaboration directory with ls -ld ~/project/collaboration should produce output similar to the following. Note the s in the group permissions section, which indicates the set-GID bit is active.

ls -ld ~/project/collaboration
drwxrwsr-x. 2 labex labex 6 Apr 12 12:34 collaboration

Summary

In this challenge, you have learned how to create a set-GID directory. By setting the set-GID bit, you ensure that all files and subdirectories created within that directory automatically inherit the group ownership of the parent directory. This is an essential skill for system administrators managing shared resources, as it streamlines permissions and enhances collaboration within teams.

✨ Check Solution and Practice