From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Special directory bits: SGID and Sticky

Special directory bits: SGID and Sticky - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

Special directory bits: SGID and Sticky

- [Instructor] SGID and sticky are special bits for directories. In a terminal, let's create a directory in slash home for this exercise using mkdir. Type in cd space slash home and hit enter. Now type in sudo space mkdir space accounting and hit enter again. Type in your password and hit enter a third time. Let's verify this by typing ls space dash l. We can see that the accounting directory exists and is owned by the root user and the root group. The reason it's owned by the root user and the root group is because we elevated privileges when we created it. The permissions for the user owner are rwx, the group owner is rx and for other is rx. Now, let's create a group called accounting. Type in sudo space groupadd space accounting and hit enter. Now let's change the ownership of our accounting directory to the accounting group. Type in sudo space chown, which is change owner, space colon accounting, that's the…

Contents